+-
尝试将AndroidX迁移到Android AppCompat
从 AndroidX迁移到Appcompat时出错.这是日志构建:

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:18:5-138:19 to override.
最佳答案
所以你想从androidX迁移回支持.如果是这种情况,则从build.gradle中删除libs并添加旧的支持库.

androidx.core:core:1.0.1

并在gradle.properties文件中删除以下两个属性.

android.useAndroidX=true

android.enableJetifier=true

或者,如果要迁移到Androidx,请将这两个属性添加到gradle.properties文件中.

android.useAndroidX=true

android.enableJetifier=true
点击查看更多相关文章

转载注明原文:尝试将AndroidX迁移到Android AppCompat - 乐贴网