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.1.0-alpha04] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:9:5-28:19 to override.‘’
遇到类似这种错误
support包和AndroidX包起冲突
按照suggestion,
<application
…
android:theme="@style/AppTheme"
tools:replace=“android:appComponentFactory”>
增加该字段
或者
android:appComponentFactory=""
tools:replace=“android:appComponentFactory”
还是会有报错
我的解决方法是用androidX的包,毕竟新的包总归好点
在gradle.properties中增加
android.useAndroidX=true
android.enableJetifier=true