过滤Android Studio的[libpng error: Not a PNG file Error]错误

当出现该问题时,在Logcat是没有提示到底哪张图片出问题了,如果一个项目中的png图片非常多,那处理这个问题绝对是个噩梦。经过Google,发现可以使用以下方式绕过这个错误:

android {
    compileSdkVersion 17   
    buildToolsVersion "24.0.2"   
    ....
    //Returns true if the PNGs should be crunched, false otherwise.
    aaptOptions{ 
       cruncherEnabled = false  
   }
  ....
}

传送门:http://stackoverflow.com/questions/23366222/libpng-error-not-a-png-file-error-showing-in-android-studio

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容