Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest merger failed : Attribute application@appComponentFactory #193

Closed
jeevansurendran opened this issue Sep 4, 2018 · 51 comments
Closed

Comments

@jeevansurendran
Copy link

@jeevansurendran jeevansurendran commented Sep 4, 2018

We're transitioning from github issues to a public buganizer component. Rather
than submitting a bug here on github, please file any bugs or feature requests
at https://issuetracker.google.com/issues/new?component=439535.

I bought a new macbook pro
i have installed all the latest stuff from android studio in my laptop from the stable channel

i am not able to successfully build my project gradle when i add
implementation 'com.google.android.material:material:1.0.0-rc01'

gradle
`apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.silverpants.todolist"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test🏃1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
`
errror it shows is

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

and when i take its suggestion an error appears like this
code
`

<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"

    >
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

`

error

Manifest merger failed with multiple errors, see logs

and also

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugManifest'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs
at com.android.builder.core.AndroidBuilder.mergeManifestsForApplication(AndroidBuilder.java:524)
at com.android.build.gradle.tasks.MergeManifests.doFullTaskAction(MergeManifests.java:143)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 32 more

@dsn5ft
Copy link
Contributor

@dsn5ft dsn5ft commented Sep 4, 2018

Duplicate of #103.

This is because you are using the new Material library with the legacy Support Library. You have to migrate android.support to androidx in order to use com.google.android.material.

Please take a look at our Getting Started Guide which talks about this.

@dsn5ft dsn5ft closed this as completed Sep 4, 2018
@sammrabatool
Copy link

@sammrabatool sammrabatool commented Nov 14, 2018

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 element at AndroidManifest.xml:5:5-19:19 to override.

@sammrabatool
Copy link

@sammrabatool sammrabatool commented Nov 14, 2018

i have this error i want to show a barchart

@blessingofallah
Copy link

@blessingofallah blessingofallah commented Dec 29, 2018

I had similar problem. Added two lines in gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

These two lines automatically resolved my dependency conflicts between google's files and third party dependencies.

@bukunmialuko
Copy link

@bukunmialuko bukunmialuko commented Jan 3, 2019

I got a similar problem when using a new library,
I fixed the problem by migrating the project to androidx

The new android studio does the migration smoothly just click on Refactor-->migrate to androidx-->It will ask you to back up-->then do refactor.

Watch this tutorial, hope it helps.
https://www.youtube.com/watch?v=0FZ_eUIsLTg

@PGMacDesign
Copy link

@PGMacDesign PGMacDesign commented Jan 14, 2019

@bukunmialuko One issue I am having is that if I try your method, it indicates you need to be on Gradle 3.2.0 or higher, but switching to that version causes this exception:
https://stackoverflow.com/a/52608833/2480714
Which does not seem to have a working solution other than downgrading gradle.

@bukunmialuko
Copy link

@bukunmialuko bukunmialuko commented Jan 14, 2019

Update all your dependencies after migrating to androidx.

@drachomi
Copy link

@drachomi drachomi commented Jan 19, 2019

The error usually occurs whenever you use AndroidX with legacy support dependencies.
To solve it, just add the following line in your gradle.properties file:
android.enableJetifier=true
android.useAndroidX=true

@sandeepmaxpayne
Copy link

@sandeepmaxpayne sandeepmaxpayne commented Feb 25, 2019

still error exists

@IDFDeveloper
Copy link

@IDFDeveloper IDFDeveloper commented Mar 15, 2019

I am just extending the answer that
Add this implementation 'com.google.android.material:material:1.0.0' dependency and
Remove this dependency implementation 'com.android.support:appcompat-v7:28.0.0' from module level gradle file and its working for me.

I hope some one will get help.

@Harishn28
Copy link

@Harishn28 Harishn28 commented Mar 17, 2019

As of Android P, the support libraries have been moved to AndroidX.

so remove com.android.support dependecies and move them to use android x namespace.

more details @ https://developer.android.com/jetpack/androidx/migrate

@androidqasim
Copy link

@androidqasim androidqasim commented Mar 26, 2019

add these lines in the manifiest

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

@iamjpsharma
Copy link

@iamjpsharma iamjpsharma commented Mar 30, 2019

The error usually occurs whenever you use AndroidX with legacy support dependencies.
To solve it, just add the following line in your gradle.properties file:
android.enableJetifier=true
android.useAndroidX=true

this one workeed

@sandeepmaxpayne
Copy link

@sandeepmaxpayne sandeepmaxpayne commented Apr 1, 2019

@gaurav2010ec
Copy link

@gaurav2010ec gaurav2010ec commented Apr 26, 2019

I had similar problem. Added two lines in gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

These two lines automatically resolved my dependency conflicts between google's files and third party dependencies.

Can you please tell me where to add these two line in gradle?

@dsn5ft
Copy link
Contributor

@dsn5ft dsn5ft commented Apr 26, 2019

They can be added anywhere in your gradle.properties file.

@robleds
Copy link

@robleds robleds commented Jun 18, 2019

I had similar problem. Added two lines in gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

These two lines automatically resolved my dependency conflicts between google's files and third party dependencies.

Thanks a lot! Works for me!!!!!! Aleluia!!!!!!!!

@irfanshaikh138

This comment has been minimized.

@Gnkumararaja
Copy link

@Gnkumararaja Gnkumararaja commented Jun 20, 2019

I had similar problem. Added two lines in gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

These two lines automatically resolved my dependency conflicts between google's files and third party dependencies.

It's Working thanks...

@abdussamad123
Copy link

@abdussamad123 abdussamad123 commented Jun 21, 2019

After use, all the above suggestions my Error still exists. can anyone help me, please?

@ziarno
Copy link

@ziarno ziarno commented Jun 21, 2019

Was having this issue in a ReactNative project - I used the "Migrate to AndroidX" option in Android Studio, and all it did was:

  1. Add
android.useAndroidX=true
android.enableJetifier=true

at the bottom of the file android/gradle.properties
2. Replace the line
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
with
implementation 'androidx.appcompat:appcompat:1.0.0'
in android/app/build.gradle

Works great for me after this change

@nikopolidi
Copy link

@nikopolidi nikopolidi commented Jun 25, 2019

in my react-native app I solved it that way:

yarn upgrade --pattern react-native solved my issues
Refactoring to androidx only created cascades of issues
I had no androidx dependencies in build.gradle file, but had some inside node_modules.
I stayed up with "com.android.support:appcompat-v7:28.0.0"

@madgreasemonkey
Copy link

@madgreasemonkey madgreasemonkey commented Jul 25, 2019

I had similar problem. Added two lines in gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

These two lines automatically resolved my dependency conflicts between google's files and third party dependencies.

My app crashed after writing these two lines

@send2abhishek
Copy link

@send2abhishek send2abhishek commented Aug 4, 2019

I had similar problem. Added two lines in gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

These two lines automatically resolved my dependency conflicts between google's files and third party dependencies.

Add this two lines of code in Gradle.properties files

@buddhiv
Copy link

@buddhiv buddhiv commented Aug 6, 2019

The error usually occurs whenever you use AndroidX with legacy support dependencies.
To solve it, just add the following line in your gradle.properties file:
android.enableJetifier=true
android.useAndroidX=true

worked! thanks.. Build is successful. Yet don't know if there is any runtime issues. I ll update if there is any.

@imAunAbbas
Copy link

@imAunAbbas imAunAbbas commented Aug 28, 2019

My app was working fine and then I installed react-native-push-notification library and now I'm getting this error as my Gradle files are not syncing.

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.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
	Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at manifestMerger5259550878296044450.xml:7:5-9:19 to override.

My issue is not with Material and I tried every mentioned solution but still facing same error even when I remove the dependencies of that library.

@AliYar-Khan
Copy link

@AliYar-Khan AliYar-Khan commented Aug 28, 2019

My app was working fine and then I installed react-native-push-notification library and now I'm getting this error as my Gradle files are not syncing.

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.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
	Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at manifestMerger5259550878296044450.xml:7:5-9:19 to override.

My issue is not with Material and I tried every mentioned solution but still facing same error even when I remove the dependencies of that library.

check this comment #193 (comment) or upgrade your react-native version #193 (comment)

@jairhumberto
Copy link

@jairhumberto jairhumberto commented Sep 11, 2019

This gradle is the worst thing in Android, NEVER works fine; if you get your project and move from one computer to another, you have headache.

@jairhumberto
Copy link

@jairhumberto jairhumberto commented Sep 11, 2019

Then you have to do some sort of hack to get it to work... like adding these two properties. This thing really need improvement.

@sandeepmaxpayne
Copy link

@sandeepmaxpayne sandeepmaxpayne commented Sep 12, 2019

@pouriaHemmati
Copy link

@pouriaHemmati pouriaHemmati commented Sep 15, 2019

Those two properties need to be defined in a gradle.properties file at the root of your project, not in your build.gradle.

android.useAndroidX=true
android.enableJetifier=true

@milesmeow
Copy link

@milesmeow milesmeow commented Oct 6, 2019

I had similar problem. Added two lines in gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

These two lines automatically resolved my dependency conflicts between google's files and third party dependencies.

I needed to also follow this:
facebook/react-native#25483 (comment).

The combination of adding those lines to gradle.properties worked for me!

@neoacevedo
Copy link

@neoacevedo neoacevedo commented Oct 10, 2019

:(
Already I used Android Studio to migrate my project to AndroidX. It automatically adds the 2 lines in gradle.properties and replaces all android support libraries to the new AndroidX but I continue having the same issue.

@khatzie
Copy link

@khatzie khatzie commented Dec 2, 2019

Was having this issue in a ReactNative project - I used the "Migrate to AndroidX" option in Android Studio, and all it did was:

  1. Add
android.useAndroidX=true
android.enableJetifier=true

at the bottom of the file android/gradle.properties
2. Replace the line
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
with
implementation 'androidx.appcompat:appcompat:1.0.0'
in android/app/build.gradle

Works great for me after this change

This solve my problem.. 👍👍👍👍👍👍👍

@androidcode33
Copy link

@androidcode33 androidcode33 commented Dec 5, 2019

The error usually occurs whenever you use AndroidX with legacy support dependencies.
To solve it, just add the following line in your gradle.properties file:
android.enableJetifier=true
android.useAndroidX=true

worked for me

@abd0ibrahim
Copy link

@abd0ibrahim abd0ibrahim commented Dec 19, 2019

I had similar problem. Added two lines in gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

These two lines automatically resolved my dependency conflicts between google's files and third party dependencies.

Works like a charm !

@sandeepa91
Copy link

@sandeepa91 sandeepa91 commented Dec 20, 2019

After adding
android.useAndroidX=true
android.enableJetifier=true
it solved and added androidx classes for all layouts
androidx.constraintlayout.widget.ConstraintLayout
androidx.drawerlayout.widget.DrawerLayout
Thank you @dsn5ft dsn5ft

@surajbanerjee
Copy link

@surajbanerjee surajbanerjee commented Dec 29, 2019

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 element at AndroidManifest.xml:5:5-19:19 to override.

not geetin the problem plzz help.

@hyunjkim
Copy link

@hyunjkim hyunjkim commented Jan 16, 2020

For anyone who isn't using Androidx and if you're using proguard, I see that adding this line in your proguard helped without adding anything to the manifest:

Proguard.flags https://android.googlesource.com/platform/packages/apps/Settings/+/master/proguard.flags#58

-keep class androidx.core.app.CoreComponentFactory

@bestfc
Copy link

@bestfc bestfc commented Feb 1, 2020

Was having this issue in a ReactNative project - I used the "Migrate to AndroidX" option in Android Studio, and all it did was:

  1. Add
android.useAndroidX=true
android.enableJetifier=true

at the bottom of the file android/gradle.properties
2. Replace the line
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
with
implementation 'androidx.appcompat:appcompat:1.0.0'
in android/app/build.gradle

Works great for me after this change

thanks,it worked for me

@Allan-Nava
Copy link

@Allan-Nava Allan-Nava commented Feb 27, 2020

Was having this issue in a ReactNative project - I used the "Migrate to AndroidX" option in Android Studio, and all it did was:

  1. Add
android.useAndroidX=true
android.enableJetifier=true

at the bottom of the file android/gradle.properties
2. Replace the line
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
with
implementation 'androidx.appcompat:appcompat:1.0.0'
in android/app/build.gradle
Works great for me after this change

thanks,it worked for me

I got the same error

@ruwanmadhusanka
Copy link

@ruwanmadhusanka ruwanmadhusanka commented Mar 30, 2020

Android Studio>Refactor>Migrate to AndroidX
Then Do Refactor.

This solves my problem.

@RashmiShrestha
Copy link

@RashmiShrestha RashmiShrestha commented Apr 27, 2020

build.gradle

  • use only one in bulid.gradle '1' or '2'
  1. implementation 'com.android.support:appcompat-v7:28.0.0'
    (or)
  2. implementation 'androidx.appcompat:appcompat:1.1.0'
  • incase if you have
    implementation 'com.google.android.gms:play-services-maps:$suitable_version
    example:- implementation 'com.google.android.gms:play-services-maps:16.0.0'

@NiklasWilson
Copy link

@NiklasWilson NiklasWilson commented May 15, 2020

Doing the refactor, works but you have to do it every single time.
The file below get overwritten each time.
android/capacitor-cordova-android-plugins/build.gradle
Replacing the androidx line with appcompat-v7

@smbiplob786
Copy link

@smbiplob786 smbiplob786 commented Aug 3, 2020

I had similar problem. Added two lines in gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

These two lines automatically resolved my dependency conflicts between google's files and third party dependencies.
yes and video tutorial about how to apply and where to apply
see this video
https://weblearners.blogspot.com/2020/08/how-to-solve-manifest-merger-failed.html

@sandeepmaxpayne
Copy link

@sandeepmaxpayne sandeepmaxpayne commented Aug 3, 2020

@janko-sokolovic
Copy link

@janko-sokolovic janko-sokolovic commented Jan 11, 2021

What about when I have project with 5-6 modules, I have 1 module that must remain 'old' non X version, while other new module can be androidX. How to go about that problem?

mohand1993 pushed a commit to mohand1993/material-components-android that referenced this issue Jun 23, 2021
…er_viewe

Updating RecyclerViewKotlin sample
@bhar-subhajit
Copy link

@bhar-subhajit bhar-subhajit commented Feb 1, 2022

@bukunmialuko One issue I am having is that if I try your method, it indicates you need to be on Gradle 3.2.0 or higher, but switching to that version causes this exception: https://stackoverflow.com/a/52608833/2480714 Which does not seem to have a working solution other than downgrading gradle.

@PGMacDesign Did you find any solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests