Manifest merger failed how to solve? [duplicate] - android

This question already has an answer here:
Manifest Merger Error - Different versions of support library
(1 answer)
Closed 4 years ago.
After adding new library app showing error?
I am trying to add
compile 'com.github.badoualy:stepper-indicator:1.0.7'
and after added this my app showing error
Error:Execution failed for task ':sample:processShopifyDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.4.0) from
[com.android.support:design:25.3.1] AndroidManifest.xml:27:9-31 is
also present at [com.android.support:appcompat-v7:26.0.0-beta2]
AndroidManifest.xml:28:13-41 value=(26.0.0-beta2). Suggestion: add
'tools:replace="android:value"' to element at
AndroidManifest.xml:23:9-25:38 to override.
May be this is right way to solve this issue
https://stackoverflow.com/a/45258773/10010192

Probably you are using multiple versions of Android support library. So Please choose one of version and use it for all libraries. Maybe you can try 25.4.0 for all. (You also need to change compileSdkVersion and targetSdkVersion to 25.4.0)

don't use 'compile' in build.gradle.
try to change
compile 'com.github.badoualy:stepper-indicator:1.0.7'
to
implementation 'com.github.badoualy:stepper-indicator:1.0.7'

Related

ERROR: Manifest merger failed : Attribute application#appComponentFactory in android [duplicate]

This question already has answers here:
Manifest merger failed : Attribute application#appComponentFactory - Androidx
(14 answers)
Closed 2 years ago.
I'm not able to use android.support.v7.app.AppCompatActivity. It shows error on import android.support.v7.app.AppCompatActivity; as follows: Cannot resolve symbol 'v7'. I have even added implementation 'com.android.support:appcompat-v7:28.0.0' in the build.gradle.
After setting android.useAndroidX=true and android.enableJetifier to false in the gradle.properties, the above mentioned error resolves but instead, I'm getting an error as follows: 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.5.0-alpha02] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:5:5-20:19 to override. Even after adding tools:replace="android:appComponentFactory to AndroidManifest.xml, I'm getting the same error.
I'm using compileSdkVersion 28 and targetSdkVersion 28.
This is primarily happening because you are using Androidx with the v28 support library , you can remove the v28 library if you are using the androidx library , if you are using the v28 support library do otherwise.
androidx.core:core:1.5.0-alpha02
Well the error says that because androidx core and v28 are conflicting. Use either one. And androidx core also has the same methods as the v7.AppCompatActivity has , so why don't you migrate it to androidx using
import androidx.appcompat.app.AppCompatActivity

Sync Gradle Error When I try to add "compile 'com.facebook.android:facebook-android-sdk:[4,5)'" on my build.gradle dependencies

I am trying to implement a Facebook login feature on my app and I followed every step until I encountered an "Execution failed for task ':app:processDebugManifest'" error. It says :
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(26.0.0-alpha1) from [com.android.support:appcompat-v7:26.0.0-alpha1] AndroidManifest.xml:27:9-38
is also present at [com.android.support:cardview-v7:25.3.1] AndroidManifest.xml:24:9-31 value=(25.3.1).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:25:5-27:41 to override.
[EDIT]Thank you in advance guys. I am not sure how to add files so here's a picture of the build.gradle file.
You have dependency conflicts. Make sure all your com.android.support:.. imports are of the same version e.g. 25.0.0 and use fixed versions not 26+ as this can also cause problems.
edit: change com.android.support:appcompat-v7:26+ to com.android.support:appcompat-v7:25.3.1

Android Gradlebuild

Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31
is also present at [com.android.support:recyclerview-v7:26.0.0-alpha1] AndroidManifest.xml:24:9-38 value=(26.0.0-alpha1).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:34 to override.
Generally speaking (also Lint tells you so), you should not mix different versions of the support library. Even though this comes up with the manifest merger, because android.support.VERSION is also defined as meta data.
So to make sure this doesn't happen anymore, define version 26.0.0-alpha1 for all the support libraries. In your case especially for appcompat.
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'

tools:replace does not work

I want to use android:allowBackup=false, but some other libraries have android:allowBackup=true.
So I need to add tools:replace="android:allowBackup", and this is also the way the Manifest Merger suggests, BUT it does not work.
After compile and also in the Manifest Merger Tool I get again the same error.
The tools:replace is already set, but the Manifest Merge suggests to add it.
If I click on the suggestion it will add another tools:replace tag.
Here is the Manifest Merger error:
This seems to be caused by a bug in the Gradle plugin: https://code.google.com/p/android/issues/detail?id=193679
If you remove the tools:ignore attribute from the application element, it should work.

Android theme error when adding a new dependency

I'm following the examples on this sample from github but when i add the dependency I recieve the error
"
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute application#theme value=(#style/AppTheme) from AndroidManifest.xml:20:9-40
is also present at [com.github.boxme:squarecamera:1.0.3] AndroidManifest.xml:11:18-76 value=(#style/squarecamera__CameraFullScreenTheme).
Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:16:5-81:19 to override."
I gather it's because im using this "compile 'com.android.support:appcompat-v7:22.2.1'" which is an older version and is conflicting with the theme from the added dependency.
however I want to avoid changing appcompat to a newer version because every activity i have relies on 22.2.1 and the change would be too great.
Are there any ways of working around this error? Or should i just look into another way of creating a square image from camera activity?

Categories

Resources