skip to Main Content

I upgraded my react native expo managed app to expo 48 and since then, the ios builds work fine but the android build fails when I try to run eas build for android.

Below is the error message. I would appreciate any help on what I am doing wrong:

https://firebasestorage.googleapis.com/v0/b/mpcwebsite2.appspot.com/o/gradle%20issue.md?alt=media&token=488b695f-0d17-49fd-8fab-e1feb52fb484

It was too long to paste here but here is final snippet:

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

-----------

* What went wrong:

Execution failed for task ':app:mergeReleaseResources'.

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

   > Resource compilation failed (Failed to compile values resource file /home/expo/workingdir/build/android/app/build/intermediates/incremental/release/mergeReleaseResources/merged.dir/values/values.xml. Cause: java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource@2e0888e.). Check logs for more details.

* 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.

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

2: Task failed with an exception.

-----------

* What went wrong:

java.lang.StackOverflowError (no error message)

* 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

BUILD FAILED in 7m 34s

2

Answers


  1. Chosen as BEST ANSWER

    The issue was in the notifications object in app.json. I had to remove all the color key/ value pairs.


  2. I faced the same problem and solved by upgrading expo sdk to @49.0.0

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search