2017-07-02 87 views
1

我一直在获取Manifest合并错误。 Gradle依赖关系显示在image attached中。Android Manifest合并错误

Error:Execution failed for task ':app:processDebugManifest'. 
> Manifest merger failed : Attribute meta-data#[email protected] value=(25.3.1) from [com.android.support:customtabs:25.3.1] AndroidManifest.xml:24:9-31 
is also present at [com.android.support:design:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1). 
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:22:5-24:34 to override.  
+0

您正在使用多个不同版本的Android支持库工件。如果你编辑你的问题并从app/build.gradle发布'dependencies'闭包,或许我们可以给你更具体的建议。 – CommonsWare

+0

您可以尝试从customtabs依赖项中排除支持库。 –

回答

0

这是不是你会发现使用不同的支持库版本,或者使用的解决策略,并在您的应用程序模块的build.gradle的末尾添加该库:

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

欲了解更多信息请检查:Android Support Repo 46.0.0 with Android Studio 2.3