LeakCanary 工具的使用
官网
使用
- 添加依赖
dependencies {
//leakcanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
// Optional, if you use support library fragments:
debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.2'
}
- Application 中初始化
LeakCanary.install(this);
网友评论