造成运行项目报错-Manifest merger failed with multiple errors, see logs的原因是多方面的,此次遇到的这个问题的原因是因为引入依赖时导致compile ‘com.android.support:XXXX:25.3.1’ 与 compile ‘com.android.support:XXXX:26.0.0-alpha1’所冲突造成的。

错误提示:
关于Manifest merger failed with multiple errors, see logs
解决方法:
1、点击右下角GradleConsole,这里会告诉你为什么会出现错误。
关于Manifest merger failed with multiple errors, see logs
2、根据给出的信息大致就可以知道造成错误的原因是什么了,这样才可以对症下药。
关于Manifest merger failed with multiple errors, see logs
3、我这里的解决方法是在App下的build.gradle中添加:
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
//这里的“25.3.1”是因为目前最新版本是25.3.1,可以根据自己所使用的版本来进行修改,只不过一定要与工程的各部分保持一致
details.useVersion '25.3.1'
}
}
}
}

相关文章:

  • 2021-04-03
  • 2021-12-24
猜你喜欢
  • 2021-08-19
相关资源
相似解决方案