"Manifest merger failed"问题的解决思路

当编译的时候报这个错误:

Manifest merger failed with multiple errors, see logs

这个时候可以用下面的命令查看到底是什么东西冲突了

gradlew processDebugManifest --stacktrace
> Task :app:processDebugManifest FAILED
D:\aspjs\kinland\app\src\main\AndroidManifest.xml:14:5-67 Warning:
        Element uses-permission#android.permission.INTERNET at AndroidManifest.xml:14:5-67 duplicated with element declared at AndroidManifest.xml:6:5-67
D:\aspjs\kinland\app\src\main\AndroidManifest.xml:25:9-47 Error:
        Attribute application@icon value=(@mipmap/ic_launcher_new) from AndroidManifest.xml:25:9-47
        is also present at [com.github.**:v1.0.1] AndroidManifest.xml:13:9-43 value=(@mipmap/ic_launcher).
        Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:22:5-125:19 to override.
D:\aspjs\kinland\app\src\main\AndroidManifest.xml:27:9-58 Error:
        Attribute application@roundIcon value=(@mipmap/ic_launcher_round_new) from AndroidManifest.xml:27:9-58
        is also present at [com.github.**] AndroidManifest.xml:15:9-54 value=(@mipmap/ic_launcher_round).
        Suggestion: add 'tools:replace="android:roundIcon"' to <application> element at AndroidManifest.xml:22:5-125:19 to override.

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

日志上可以看出来有两个字段冲突了,并且给出了提示,这里直接加上就好了,两个字段的话中间用逗号分隔

tools:replace="android:icon,android:roundIcon"
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 官网 中文版本 好的网站 Content-type: text/htmlBASH Section: User ...
    不排版阅读 9,947评论 0 5
  • ORA-00001: 违反唯一约束条件 (.) 错误说明:当在唯一索引所对应的列上键入重复值时,会触发此异常。 O...
    我想起个好名字阅读 10,792评论 0 9
  • 一、Python简介和环境搭建以及pip的安装 4课时实验课主要内容 【Python简介】: Python 是一个...
    _小老虎_阅读 11,132评论 0 10
  • 什么是数据库? 数据库是存储数据的集合的单独的应用程序。每个数据库具有一个或多个不同的API,用于创建,访问,管理...
    chen_000阅读 9,461评论 0 19
  • 去年有段时间得空,就把谷歌GAE的API权威指南看了一遍,收获颇丰,特别是在自己几乎独立开发了公司的云数据中心之后...
    骑单车的勋爵阅读 20,870评论 0 41