Android Build failed to read PNG signature

Hi,
Android build keeps failing with this error logged:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource compilation failed
     /home/gradle/builds/AdaloApp/android/app/build/generated/res/react/release/drawable-mdpi/images_226efa2e2b8428a947d09540a3baa575e0e5318d9f2945bc47d62cdad148dc5d.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
         
     /home/gradle/builds/AdaloApp/android/app/build/generated/res/react/release/drawable-mdpi/images_226efa2e2b8428a947d09540a3baa575e0e5318d9f2945bc47d62cdad148dc5d.png: AAPT: error: file failed to compile.
         

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

There are a lot of images in the database, any idea how can I find the mentioned image?
However, the iOS build works great.

The problem is solved

Fortunately, most of the uploaded images were jpg, only 20 was png.
I converted and optimized all the png and replaced them on Adalo.

Glad it’s solved and thanks for reporting it. I have created a ticket about this for the team to look into so we can determine the cause better.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.