Android studio3.1.3(较老版本)依赖butterknife报错:
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.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:6:5-30:19 to override.
根据提示加入:
tools:replace="android:appComponentFactory"
加入后仍然报错:
Manifest merger failed with multiple errors, see logs
经查阅后完成添加两行即可:
tools:replace="android:appComponentFactory"
android:appComponentFactory=""
完整代码AndroidManifest.xml
中的application
标签:
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:appComponentFactory"
android:appComponentFactory=""
>
网友评论