【发布时间】:2021-07-06 14:01:34
【问题描述】:
当我调试我的项目时,出现错误“Manifest merge failed with multiple errors, see logs”
任务“:app:processDebugMainManifest”执行失败。 错误: 属性 application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) 来自 [androidx.core:core:1.5.0] AndroidManifest.xml:24:18-86 也存在于 [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory)。 建议:将 'tools:replace="android:appComponentFactory"' 添加到 AndroidManifest.xml:5:5-22:19 的元素以覆盖。
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kelompok22.veterinarycare">
<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/Theme.Transparent">
<activity android:name=".RegisterActivity"></activity>
<activity android:name=".StartActivity" />
<activity android:name=".LoginActivity" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
【问题讨论】:
-
你能分享一下你的gradle依赖列表吗?
-
@GaganBatra 实现 'androidx.appcompat:appcompat:1.3.0' 实现 'com.google.android.material:material:1.3.0' 实现 'androidx.constraintlayout:constraintlayout:2.0.4'实施 'androidx.legacy:legacy-support-v4:1.0.0' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso- core:3.3.0' 实现 'com.etebarian:meow-bottom-navigation-java:1.2.0'