前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >"Manifest merger failed"问题的解决思路

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

作者头像
坑吭吭
发布2019-06-25 10:21:44
8.1K0
发布2019-06-25 10:21:44
举报

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

代码语言:javascript
复制
Manifest merger failed with multiple errors, see logs

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

代码语言:javascript
复制
gradlew processDebugManifest --stacktrace
代码语言:javascript
复制
> 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.

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

代码语言:javascript
复制
tools:replace="android:icon,android:roundIcon"
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019.06.24 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档