Error:Execution failed for task ':test:processDebugManifest'.> Manifest merger failed with multiple errors, see logs
在使用Android studio 開發 的時候遇到這樣的報錯 ,除了這個log,看不到其他有用的信息。
我們可以使用命令行
gradlew processDebugManifest --stacktrace
其中,processDebugManifest是log裏面提到的,這個命令是會了獲取更多的log信息。
我的是mac 在Terminal 中輸入
./gradlew processDebugManifest --stacktrace
-64:83
/Users/apple/AndroidStudioProjects/InvestmentApplication/app/src/main/AndroidManifest.xml:8:9-43 Error:
Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:8:9-43
is also present at [com.pnikosis:materialish-progress:1.0] AndroidManifest.xml:13:9-45 value=(@drawable/ic_launcher).
Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:5:5-55:19 to override.
打印的信息很明顯 是引入library 的時候 屬性衝突 合併失敗,按照他的建議
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
tools:replace="android:icon"
加 'tools:replace="android:icon"' 問題解決