Android Studio 主清单文件报错


报错: 

?

1

2

3

4

5

Error:(32, 9) Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:32:9

Error:(32, 9) Execution failed for task ':app:processDebugManifest'.

> Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:32:9

    is also present at DemoStorage:PG_Edit_SDK:unspecified:13:9 value=(@drawable/ic_launcher)

    Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:29:5 to override

注意两个地方:


1. 在manifest节点加上:xmlns:tools="http://schemas.android.com/tools"


2. 在application 节点加上:tools:replace="android:icon, android:theme"


然后重新编译下就没有错误了

你可能感兴趣的:(Android Studio 主清单文件报错)