Here is the error that keeps coming up on the event log:
Generate Signed APK: Errors while building APK. You can find the errors in the 'Messages' view
And this in the messages:
Android resource compilation failed Output:
C:\Users\me\AndroidStudioProjects\SimpleCalculator2\app\src\main\res\mipmap-xxhdpi\ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
Command:
C:\Users\me\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971- windows.jar\6c29a9fd1a7f2d4d5ddcbb0cbfa348c6\aapt2-3.2.0-4818971-windows\aapt2.exe compile --legacy\-o\
C:\Users\me\AndroidStudioProjects\SimpleCalculator2\app\build\intermediates\res\merged\release \
C:\Users\me\AndroidStudioProjects\SimpleCalculator2\app\src\main\res\mipmap-xxhdpi\ic_launcher.png
Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
Just paste this in your build.gradle file
android {
....
aaptOptions {
cruncherEnabled = false
}
....
}
This happens when you either rename an image or when you just cut and paste an image anywhere in the app folders, At Build time the compiler will complain about this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With