Execution failed for task ':app:processDebugManifest'

来源:互联网 发布:淘宝卖家花呗开通条件 编辑:程序博客网 时间:2024/05/19 17:48
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:support-v4: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:25:5-27:34 to override.

项目引用第三方库的时候出现了版本冲突,解决方法如下:
在app的bulid.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.1'            }        }    }}
阅读全文
0 0