當出現該問題時,在Logcat是沒有提示到底哪張圖片出問題了,如果一個項目中的png圖片非常多,那處理這個問題絕對是個噩夢。經過Google,發現可以使用以下方式繞過這個錯誤:
android {
compileSdkVersion 17
buildToolsVersion "24.0.2"
....
//Returns true if the PNGs should be crunched, false otherwise.
aaptOptions{
cruncherEnabled = false
}
....
}