Execution failed for task ':app:mergeReleaseResources' (When running eas build -p android --profile production)

1.2k Views Asked by At

I'm getting the following error when building the react-native apk app for android via expo build command for production.

Below is the package.json, eas.json and error

  1. package.json ((https://i.stack.imgur.com/3pgm5.png)
  2. eas.json (https://i.stack.imgur.com/tY3YS.png)

ERROR ON EXPO BUILD:

[stderr] Execution failed for task ':app:mergeReleaseResources'. [stderr] > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable [stderr] > Android resource compilation failed [stderr] ERROR:/home/expo/workingdir/build/mobile-app-paywise/android/app/build/generated/res/react/release/drawable-mdpi/assets_images_registration.png: AAPT: error: file failed to compile. [stderr]
[stderr] * Try: [stderr] > Run with --stacktrace option to get the stack trace. [stderr] > Run with --info or --debug option to get more log output. [stderr] > Run with --scan to get full insights. [stderr] ============================================================================== [stderr] 2: Task failed with an exception. [stderr] ----------- [stderr] * What went wrong: [stderr] java.lang.StackOverflowError (no error message) [stderr] * Try: [stderr] > Run with --stacktrace option to get the stack trace. [stderr] > Run with --info or --debug option to get more log output. [stderr] > Run with --scan to get full insights. [stderr] ============================================================================== [stderr] * Get more help at https://help.gradle.org [stderr] BUILD FAILED in 5m 13s Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Tried npx expo prebuild, and deleted the drawable* files, but still facing same issues. Appreciate if anyone could help :(

0

There are 0 best solutions below