question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Manifest merger failed Attribute meta-data#android.support.VERSION

See original GitHub issue

I’ve just ejected expo project with Expokit and after adding react native fcm I can’t build project on Android. First of I have received google service versions clashes but I have resolved it. Now I’ve got an error which I do not know how to resolve.

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

Every help would be appreciated React Native 0.52 React Native FCM 14.1.2 Expo 25.0.0

And here is my app/build.gradle

buildscript {
  repositories {
    maven { url 'https://maven.fabric.io/public' }
  }

  dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
  }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.neenbedankt.android-apt'

repositories {
  maven { url 'https://maven.fabric.io/public' }
}

android {
  compileSdkVersion 26
  buildToolsVersion '26.0.1'

  defaultConfig {
    applicationId 'com.beready'
    targetSdkVersion 25
    versionCode 1
    versionName '0.1.0'
    ndk {
      abiFilters 'armeabi-v7a', 'x86'
    }
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    // Deprecated. Used by net.openid:appauth
    manifestPlaceholders = [
      'appAuthRedirectScheme': 'host.exp.exponent'
    ]
  }
  dexOptions {
    javaMaxHeapSize System.getenv("DISABLE_DEX_MAX_HEAP") ? null : "8g"
  }
  productFlavors {
    // Define separate dev and prod product flavors.
    dev {
      // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
      // to pre-dex each module and produce an APK that can be tested on
      // Android Lollipop without time consuming dex merging processes.
      minSdkVersion 21
    }
    devRemoteKernel {
      minSdkVersion 21
    }
    dev19 {
      // For debugging / development on older SDK versions. Increases build
      // time so use 'dev' if not running on older SDKs.
      minSdkVersion 19
    }
    prod {
      // The actual minSdkVersion for the application.
      minSdkVersion 19
    }
  }
  buildTypes {
    debug {
      debuggable true
    }
    release {
      minifyEnabled true
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      zipAlignEnabled true
    }
  }
  signingConfigs {
    debug {
      storeFile file('../debug.keystore')
    }
  }
  lintOptions {
    abortOnError false
  }
}

// Don't use modern jsc-android since it still has some critical bugs that
// crash applications when the string for the JS bundle is loaded and when
// locale-specific date functions are called.
// configurations.all {
//   resolutionStrategy {
//     force 'org.webkit:android-jsc:r216113'
//   }
// }


task exponentPrebuildStep(type: Exec) {
  workingDir '../'
  if (System.getProperty('os.name').toLowerCase().contains('windows')) {
    commandLine 'cmd', '/c', '.\\detach-scripts\\prepare-detached-build.bat'
  } else {
    commandLine './detach-scripts/prepare-detached-build.sh'
  }
}
preBuild.dependsOn exponentPrebuildStep


dependencies {
  compile project(':react-native-fcm')
  compile 'com.google.firebase:firebase-core:10.0.1' //this decides your firebase SDK version
  compile 'com.google.firebase:firebase-messaging:10.0.1'


  compile fileTree(dir: 'libs', include: ['*.jar'])

  compile 'com.android.support:multidex:1.0.1'

  // Our dependencies
  compile 'com.android.support:appcompat-v7:26.0.1'

  // Our dependencies from ExpoView
  // DON'T ADD ANYTHING HERE THAT ISN'T IN EXPOVIEW. ONLY COPY THINGS FROM EXPOVIEW TO HERE.
  compile 'com.android.support:appcompat-v7:26.0.1'
  compile 'com.facebook.android:facebook-android-sdk:4.7.0'
  compile('com.facebook.android:audience-network-sdk:4.22.1') {
    exclude module: 'play-services-ads'
  }
  provided 'org.glassfish:javax.annotation:3.1.1'
  compile 'com.jakewharton:butterknife:7.0.1'
  compile 'de.greenrobot:eventbus:2.4.0'
  compile 'com.amplitude:android-sdk:2.9.2' // Be careful when upgrading! Upgrading might break experience scoping. Check with Jesse. See Analytics.resetAmplitudeDatabaseHelper
  compile 'com.squareup.picasso:picasso:2.5.2'
  compile 'com.google.android.gms:play-services-gcm:10.0.1'
  compile 'com.google.android.gms:play-services-analytics:10.0.1'
  compile 'com.google.android.gms:play-services-maps:10.0.1'
  compile 'com.google.android.gms:play-services-auth:10.0.1'
  compile 'com.google.android.gms:play-services-location:10.0.1'
  compile 'com.google.android.gms:play-services-ads:10.0.1'
  apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
....
compile('host.exp.exponent:expoview:25.0.0@aar') {
    transitive = true
  }
  
  
}

// This has to be down here for some reason
apply plugin: 'com.google.gms.google-services'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
yaminijaincommented, Oct 4, 2018

configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> def requested = details.requested if (requested.group == ‘com.android.support’) { if (!requested.name.startsWith(“multidex”)) { details.useVersion ‘26.0.2’ } } } } NOTE :Add this to your build.gradle and make sure you are using the same versions as ‘26.0.2’.

1reaction
gitsadcommented, Mar 22, 2018

Ok, After some trying, stashing and configuring from scratch I make it works at least. I do not know why that problem was occurring. I have followed the instruction every time. It could appear because of some dependency conflict but unfortunately, I don’t know which one it was.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting "Manifest merger failed" error after updating to a new ...
Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=( ...
Read more >
Manifest merger failed : Attribute meta-data#android.support ...
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':processDebugManifest'. > Manifest merger failed ...
Read more >
Manifest merger failed Attribute meta data#android ... - YouTube
Manifest merger failed Attribute meta data # android support VERSION @value value.
Read more >
Manage manifest files - Android Developers
Learn about manifest build variables, manifest merge, the manifest merger tool.
Read more >
manifest merger failed - unity + android - Wikitude
Android Studio may complain about minSdk version and targetSdk version being set. Remove the line from the AndroidManifest.xml ( <uses-sdk android:minSdkVersion ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found