Execution failed for task ':app:mergeReleaseResources'.

Please provide the following:

  1. SDK Version:
  2. Platforms(Android/iOS/web/all):
  3. Add the appropriate “Tag” based on what Expo library you have a question on.
    [stderr]
FAILURE: Build completed with 2 failures.

495[stderr]

1: Task failed with an exception.

496[stderr]

-----------

497[stderr]

* What went wrong:

498[stderr]

Execution failed for task ':app:mergeReleaseResources'.

499[stderr]

> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable

500[stderr]

   > Android resource compilation failed

501[stderr]

     ERROR:/home/expo/workingdir/build/android/app/build/generated/res/react/release/drawable-mdpi/src_imgs_banner.png: AAPT: error: file failed to compile.

502[stderr]

         

503[stderr]

* Try:

504[stderr]

> Run with --stacktrace option to get the stack trace.

505[stderr]

> Run with --info or --debug option to get more log output.

506[stderr]

> Run with --scan to get full insights.

507[stderr]

==============================================================================

508[stderr]

2: Task failed with an exception.

509[stderr]

-----------

510[stderr]

* What went wrong:

511[stderr]

java.lang.StackOverflowError (no error message)

512[stderr]

* Try:

513[stderr]

> Run with --stacktrace option to get the stack trace.

514[stderr]

> Run with --info or --debug option to get more log output.

515[stderr]

> Run with --scan to get full insights.

516[stderr]

==============================================================================

517[stderr]

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

518[stderr]

BUILD FAILED in 4m 25s

This normally means that you have a file called something like src/imgs/banner.png that is not actually a PNG.

e.g. if you’re on macOS or Linux you can use the file command to check what format the image actually is. I would guess it’s a JPEG.

You have two possible solutions:

  1. Rename the file to e.g. banner.jpg if it’s a JPEG.
  2. Convert the file to a PNG.

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