2

when I debug my project, there is an error "Manifest merger failed with multiple errors, see logs"

Execution failed for task ':app:processDebugMainManifest'. Error: Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.5.0] AndroidManifest.xml:24:18-86 is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:5:5-22:19 to override.

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>

Rahadian Nugraha
  • 31
  • 1
  • 1
  • 3
  • Can you share the list of your gradle dependencies once ? – Gagan Batra Jul 06 '21 at 14:07
  • @GaganBatra implementation 'androidx.appcompat:appcompat:1.3.0' implementation 'com.google.android.material:material:1.3.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation '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' implementation 'com.etebarian:meow-bottom-navigation-java:1.2.0' – Rahadian Nugraha Jul 06 '21 at 14:09

1 Answers1

0

Go to your Gradle File(Module App) find and remove this line from your dependencies.

implementation 'com.android.support:support-compat:28.0.0'

Then Sync Gradle to apply changes.

The problem should resolve.

Tonnie
  • 4,865
  • 3
  • 34
  • 50
  • 1
    error disappeared after I removed implementation 'com.etebarian:meow-bottom-navigation-java:1.2.0' but i want to use those dependencies – Rahadian Nugraha Jul 06 '21 at 15:39
  • Nice observation - in this case use the Kotlin version intead of java i.e. replace `navigation-java` with `implementation 'com.etebarian:meow-bottom-navigation:1.3.1'` – Tonnie Jul 06 '21 at 15:51