use*_*284 3 android leakcanary androidx
我在我的项目中使用leakcanary 1.6.3查找内存泄漏,使用没有任何问题:
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3'
Run Code Online (Sandbox Code Playgroud)
现在,我想将其更新为leakcanary 2.0 alpha 2使用:
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-alpha-2
Run Code Online (Sandbox Code Playgroud)
但是当我尝试构建项目时,它给了我manifest merger failed。
ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:10:5-50:19 to override.
Run Code Online (Sandbox Code Playgroud)
如何解决此错误?
更新:我正在android.support我的项目中使用库。