Android Material and Appcompat Manifest Merger Failed

Android Material and appcompat Manifest merger failed

Just change "rc01" in first and last line inside dependencies to "alpha1"
This is working for me

Android Material and appcompat Manifest merger failed in react-native or ExpoKit

I found a solution through my search by referring to @MehulSolanki answer.

I add

tools:replace="android:appComponentFactory"
android:appComponentFactory="whateverString"

in my on AndroidManifest.xml

and update com.android.tools.build:gradl:

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}

And add this in your gradle.properties file

android.useAndroidX=true
android.enableJetifier=true

ERROR: [TAG] Failed to resolve variable '${animal.sniffer.version}'

ERROR: [TAG] Failed to resolve variable '${junit.version}'

In case of above error

  1. File -> Invalidate Caches / restart
  2. Build -> Clean project

error: package android.support.annotation does not exist
error: cannot find symbol class Nullable

In case of above error

Add implementation 'androidx.annotation:annotation:1.1.0'

change import android.support.annotation.Nullable; => androidx.annotation.Nullable;

change import android.support.annotation.NonNull; => androidx.annotation.NonNull;

Compile version and target version should be 28.

merge manifest error when add material dependency

Check the official doc of the Material Components library:

If your app currently depends on the original Design Support Library, you can make use of the Refactor to AndroidX… option provided by Android Studio. Doing so will update your app's dependencies and code to use the newly packaged androidx and com.google.android.material libraries.

If you don't want to switch over to the new androidx and com.google.android.material packages yet, you can use Material Components via the com.android.support:design:28.0.0 dependency.

Note: You should not use the com.android.support and com.google.android.material dependencies in your app at the same time.

You have to use AndroidX libraries.

Manifest merger failed : Attribute application@appComponentFactory - Androidx

After hours of struggling, I solved it by including the following within app/build.gradle:

android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

Put these flags in your gradle.properties

android.enableJetifier=true
android.useAndroidX=true

Changes in build.gradle:

implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha04'

Refer to: https://developer.android.com/jetpack/androidx/migrate

Manifest merger failed with multiple errors after adding material design support

it says your support dependency has conflict with androidx.core dependency

the android studio cannot use android x dependencies with previous support dependencies at the same time. you should just use one of them.

use these dependencies

implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'

use this link to refactor your dependencies
https://developer.android.com/topic/libraries/support-library/refactor



Related Topics



Leave a reply



Submit