Android Studio项目打包:常见错误2:AAPT: libpng error: Not a PNG file

版权声明:本文为博主原创文章,不得随意转载,转载请注明出处!!! https://blog.csdn.net/YuDBL/article/details/85771947

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

猜你喜欢

转载自blog.csdn.net/YuDBL/article/details/85771947
今日推荐