"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  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  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"

你可能感兴趣的:("Manifest merger failed"问题的解决思路)