Android Studio集成Sweet Alert Dialog報錯(Error:Execution failed for task ':app:processDebugManifest'.)

Sweet Alert Dialog項目地址:
https://github.com/pedant/sweet-alert-dialog/blob/master/README.zh.md

導入方式:
Gradle

dependencies {
compile ‘cn.pedant.sweetalert:library:1.3’
}

方案來源:http://www.tuicool.com/articles/3qEjIrN

分析錯誤:

主程序module清單文件中, application 節點的 android:icon 屬性引用了 @mipmap/ic_launcher 圖片資源,
而依賴module的清單文件中,同樣的 android:icon 屬性卻引用了 @drawable/ic_launcher 這個圖片資源,
兩個屬性值產生衝突,導致合併清單文件失敗。

解決方案,其實錯誤提示中就給出瞭解決問題的建議。

Suggestion: add ‘tools:replace=”android:icon”‘ to element at AndroidManifest.xml:5:5 to override
意思在 AndroidManifest.xml 文件的 節點中添加 tools:replace=”android:icon” 屬性。

如圖所示:

最後rebuild就行了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章