Nativescript: Manifest merger failed after SDK Update 26.0.0

Created on 9 Aug 2017  ยท  6Comments  ยท  Source: NativeScript/NativeScript

Dear friend, we, the rest of the NativeScript community really
appreciate your feedback! While we are doing all we can to take care of every
issue, sometimes we get overwhelmed. Because of that, we will consider issues
that are not constructive or problems that cannot be reproduced "dead".
Additionally, we will treat feature requests or bug reports with unanswered
questions regarding the behavior/reproduction for more than 20 days "dead". All
"dead" issues will get closed.

Please, provide the details below:

I updated SDK from android sdk manager. After sdk update tns run android shows error.

Execution failed for task ':processF0F1F2F3F4F5F6F7F8F9F10F11F12DebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.0-alpha1) from [com.android.support:design:26.0.0-alpha1] AndroidManifest.xml:27:9-38
        is also present at [com.android.support:customtabs: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.

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

Tell us about the problem

Please, ensure your title is less than 63 characters long and starts with a capital
letter.

Which platform(s) does your issue occur on?

iOS/Android/Both

Please provide the following version numbers that your issue occurs with:

  • CLI: (run tns --version to fetch it)
  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project)
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the
    package.json file of your project)
  • Plugin(s): (look for the version number in the package.json file of your
    project)
โ”‚ Component        โ”‚ Current version โ”‚ Latest version โ”‚ Information   โ”‚
โ”‚ nativescript     โ”‚ 3.1.3           โ”‚ 3.1.3          โ”‚ Up to date    โ”‚
โ”‚ tns-core-modules โ”‚ 3.1.1           โ”‚ 3.1.1          โ”‚ Up to date    โ”‚
โ”‚ tns-android      โ”‚ 3.1.1           โ”‚ 3.1.1          โ”‚ Up to date    โ”‚
โ”‚ tns-ios          โ”‚                 โ”‚ 3.1.0          โ”‚ Not installed

Please tell us how to recreate the issue in as much detail as possible.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

android

Most helpful comment

dependencies {
    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            def requested = details.requested
            if (requested.group == 'com.android.support') {
                details.useVersion '26.0.+'
            }
        }
    }
}

Add that to your app/App_Resources/Android/app.gradle or merge it with whatever you have in dependencies {...} already and you should be good.

All 6 comments

dependencies {
    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            def requested = details.requested
            if (requested.group == 'com.android.support') {
                details.useVersion '26.0.+'
            }
        }
    }
}

Add that to your app/App_Resources/Android/app.gradle or merge it with whatever you have in dependencies {...} already and you should be good.

Hi @cagatayoncul,
Were you able to solve your case, while following the suggestion provided by @DickSmith ?

@DickSmith 's suggestion resolved the problem for me. Thanks

Thanks @DickSmith, but I had one issue with com.android.support:multidex using your suggestion, I needed to add one exception on your script:

  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.+'
         }
      }
    }
  }

Thanks @DickSmith, but I had one issue with com.android.support:multidex using your suggestion, I needed to add one exception on your script:

  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.+'
         }
      }
    }
  }

Thank you! this helps, I was stuck for so long and this solution helped me-
configurations.all {
resolutionStrategy{
force 'com.android.support:support-v4:26.0.0'
}

    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
  def requested = details.requested
  if (requested.group == 'com.android.support') {
     if (!requested.name.startsWith("multidex")) {
      details.useVersion '26.0.0'
     }
  }
}

}

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

valentinstoychev picture valentinstoychev  ยท  79Comments

lscown picture lscown  ยท  58Comments

morningrat picture morningrat  ยท  67Comments

dbbk picture dbbk  ยท  54Comments

tjvantoll picture tjvantoll  ยท  58Comments