当前位置: 移动技术网 > 移动技术>移动开发>Android > Android Studio报错Manifest merger failed with multiple errors

Android Studio报错Manifest merger failed with multiple errors

2019年07月24日  | 移动技术网移动技术  | 我要评论

1、error:execution failed for task ':xxxx:processdebugmanifest'.

> manifest merger failed with multiple errors, see logs

原因:

as的gradle插件默认会启用manifest merger tool,若library项目中也定义了与主项目相同的属性(例如默认生成的android:icon和android:theme),则此时会合并失败,并报上面的错误。

解决方法有以下2种:

方法1:在manifest.xml的application标签下添加tools:replace="android:icon, android:theme"(多个属性用,隔开,并且记住在manifest根标签上加入xmlns:tools="http://schemas.android.com/tools",否则会找不到namespace哦)

方法2:在build.gradle根标签上加上useoldmanifestmerger true (懒人方法)

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网