Browse Source

sample: 新增LeakCanary内存泄露检测

drake 1 year ago
parent
commit
885620756a
2 changed files with 2 additions and 0 deletions
  1. 1 0
      sample/build.gradle
  2. 1 0
      sample/src/main/res/values/strings.xml

+ 1 - 0
sample/build.gradle

@@ -89,4 +89,5 @@ dependencies {
     implementation "com.github.liangjingkanji:Tooltip:1.2.2" // 吐司工具
     implementation 'com.github.liangjingkanji:Engine:0.0.74'
     implementation "com.squareup.okhttp3:mockwebserver:4.10.0"
+    debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'
 }

+ 1 - 0
sample/src/main/res/values/strings.xml

@@ -2,4 +2,5 @@
     <string name="app_name">Net</string>
     <!-- TODO: Remove or change this placeholder text -->
     <string name="hello_blank_fragment">Hello blank fragment</string>
+    <string name="leak_canary_test_class_name">assertk.Assert</string>
 </resources>