赞
踩
在开发时,有一段时间没有打开开发的包,结果出现了,这个问题
Error: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:recyclerview-v7:26.0.0-alpha1] AndroidManifest.xml:24:9-38 value=(26.0.0-alpha1).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:34 to override.
解决方法:
在build.gradle(module:app)的最后面加入这一段:
android{
......
}
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'//换成你自己的版本
}
}
}
}
问题解决。网上说有其他的解决方法。试过后,没有效果。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。