Issue with building APK using eas

  Kiến thức lập trình

I was trying to build an apk with eas build -p android --profile preview.
Then I got this error:

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.res.Aapt2CompileRunnable

   > Android resource compilation failed
     ERROR:/home/expo/workingdir/build/android/app/build/generated/res/createBundleReleaseJsAndAssets/drawable-mdpi/src_images_aboutreact.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

BUILD FAILED in 8m 24s

858 actionable tasks: 858 executed

Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

I checked this path “android/app/build/generated/res/createBundleReleaseJsAndAssets/drawable-mdpi/src_images_aboutreact.png” and the createBundleReleaseJsAndAssets folder didn’t even exist. How was I supposed to check?

I searched for the solutions for the similar problem across stackoverflow and some of the solutions mentioned that this could be drawable issue. Then, I deleted the Android folder and ran eas build -p android --profile preview again, but I still got the same error. If this a drawable issue then why this still returning the error even after I deleted the Android folder?

This is so weird. Can anyone tell me what’s wrong? What did I miss here?

LEAVE A COMMENT