LightAndroid 简体中文说明
LightAndroid Library is used to help android programmer make a light app.
- LeakCanary A memory leak detection library for Android and Java.
- Glide Glide is a fast and efficient open source media management and image loading framework for Android that wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.
- logbackThe reliable, generic, fast and flexible logging framework for Java on Android.
- LightPermissions LightPermissions is build by our self for android permission. You can use it like LightPermissionActivity.
Step 1. Add it in your root build.gradle at the end of repositories:
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
dependencies { implementation 'com.github.yunlongyang:lightandroid:version' }
Step 3. Start LightAndroid in your application.
public class MainApplication extends Application { LightAndroidApplicationLike lightAndroidApplicationLike; @Override public void onCreate() { super.onCreate(); lightAndroidApplicationLike = new LightAndroidApplicationLike.Builder().setLeakCanaryEnable(true/false).build(); lightAndroidApplicationLike.onCreate(this); } }
- To Use LeakCanary, you should add this code to your dependencies. Because LeakCanary will use different library in debug and release.You can find $LeakCanaryVersion in gradle.properties.
debugImplementation "com.squareup.leakcanary:leakcanary-android:$LeakCanaryVersion" releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$LeakCanaryVersion"
If you have some good third party library to recommend or got problems when using LightAndroid, welcome to submit issues, send emails to me at [email protected], you can also join the chat room to discuss.