小编Seb*_*gel的帖子

找不到符号类AndroidExcludedRefs,DisplayLeakService,

我们声明了该项目的Github页面上所述的我们的渗漏-依赖关系。

debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
Run Code Online (Sandbox Code Playgroud)

到目前为止,一切正常。现在我们开始排除这样的已知泄漏:

ExcludedRefs.Builder excludedRefsBuilder = AndroidExcludedRefs.createAppDefaults();
excludedRefsBuilder.staticField("com.google.android.chimera.container.a", "a");
refWatcher = LeakCanary.install(app, DisplayLeakService.class, excludedRefsBuilder.build());
Run Code Online (Sandbox Code Playgroud)

现在,当我们切换到发布版本类型时,不再找到像AndroidExcludedRefs,DisplayLeakService和ExcludedRefs之类的类,因为“ no-op”依赖项不包括它们。

处理此问题的最佳方法是什么?

android leakcanary

5
推荐指数
1
解决办法
366
查看次数

标签 统计

android ×1

leakcanary ×1