Using Google's so called Material Design 2.0 requires you to add
implementation 'com.google.android.material:material:1.0.0-rc01'
in the app Gradle which also includes
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
which shows conflicts
Here's what the log says
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0-rc02] 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 <application> element at AndroidManifest.xml:5:5-19:19 to override.
Even after adding that to the Manifest it shows Manifest Merger failed with multiple error
Try adding the following labels to resolve the issue: Add the xmlns:tools line in the manifest tag. Add tools:replace= or tools:ignore= in the application tag.
So when building your app, the Gradle build merges all manifest files into a single manifest file that's packaged into your app. The manifest merger tool combines all XML elements from each file by following some merge heuristics and by obeying merge preferences that you have defined with special XML attributes.
In Android Studio 3.3 you can also see Merged Manifest by clicking on Merged Manifest tab. It's showed at the bottom of the editor pane when you open your standard project manifest.
This error is common nowadays:
When we get this types of error: When library is updated and providing use of AndroidX but we are using old one.
You can follow the steps to solve this:
With Android Studio 3.2 and higher, you can quickly migrate an existing project to use AndroidX by selecting Refactor > Migrate to AndroidX from the menu bar.
Note: To migrate an existing project that does not use any third-party libraries with dependencies that need converting, you can set the
android.useAndroidX
flag to true and theandroid.enableJetifier
flag to false.
THIS STEP WILL DO EVERYTHING AUTOMATICALLY THAT ALL ANSWER SAYS TO DO MANUALLY
Even If you get any other error like run-time build failed, then:
OR
Hope it will helps to all. Thank you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With