0

I got this error code in my code:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.1.0) from [com.android.support:design:26.1.0] AndroidManifest.xml:28:13-35
    is also present at [com.android.support:customtabs:26.0.1] AndroidManifest.xml:25:13-35 value=(26.0.1).
    Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.

This is how my gradle(project-level) looks like:

android {
   compileSdkVersion 26
   buildToolsVersion "26.0.2"
   defaultConfig {
      applicationId "com.example.mertalptasdelen.chatapp"
      minSdkVersion 16
      targetSdkVersion 26
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
   } 

These are my project dependencies:

compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:10.0.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:26.1.0'
compile 'com.firebaseui:firebase-ui:2.4.0'

Also, I read this answer link Execution failed for task :app:processDebugManifest Android Studio 2.3.3 it's similar to my error(maybe same) but I'm unable to solve it.

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96

1 Answers1

1

The problem is related with firebase-ui library. From its documentation:

Upgrading dependencies

If you would like to use a newer version of one of FirebaseUI's transitive dependencies, such as Firebase, Play services, or the Android support libraries, you need to add explicit compile declarations in your build.gradle for all of FirebaseUI's dependencies at the version you want to use.

Because you use all of the firebase-ui, you need to add the specific support library version to your build.gradle. Something like this:

//auth:
compile "com.android.support:design:26.1.0"
compile "com.android.support:customtabs:26.1.0"
compile "com.android.support:cardview-v7:26.1.0"

//Database:
compile "com.android.support:recyclerview-v7:26.1.0"
compile "com.android.support:support-v4:26.1.0"

//Storage:
compile "com.android.support:appcompat-v7:26.1.0"
compile "com.android.support:palette-v7:26.1.0"

And because you use firebase-ui:2.4.0, you need to use Firebase/Google Play version 11.4.0. So, change your firebase dependency to 11.4.0:

compile 'com.google.firebase:firebase-core:11.4.0'
ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
  • It's working !! Thanks a lot but now when emulator starts app opened but it gave me this window "App won't run unless you update the Google Play service" :( – Mertalp Tasdelen Sep 30 '17 at 20:38