Generate Signed APK: Errors while building APK. You can find the errors in the 'Messages' view.
错误信息:
AAPT: libpng error: Not a PNG file
FAILURE: Build failed with an exception.
Execution failed for task ':app:mergeDebugResources'.
> Some file crunching failed, see logs for details
AAPT: libpng error: Not a PNG file
解决方式:
在 build.gradle (Module: app) 的 android{ } 里面加入代码
aaptOptions {
cruncherEnabled = false
}

参考链接:
https://www.cnblogs.com/yidan621/p/5630682.html
本文解决在构建Android APK过程中遇到的AAPT libpng错误问题,详细介绍了错误信息及解决方案,通过修改build.gradle文件禁用资源压缩,成功解决NotaPNGfile错误。
1101

被折叠的 条评论
为什么被折叠?



