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

**, I ran into another error when building for Andriod using EAS build, this is the ending part of the log that’s shows whats wrong

I am working this eas build

Note: /home/expo/workingdir/build/node_modules/expo-notifications/android/src/main/java/expo/modules/notifications/notifications/presentation/builders/ExpoNotificationBuilder.java uses or overrides a deprecated API

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

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

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

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

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

905[stderr]

> Run with --scan to get full insights.

2: Task failed with an exception.

`
* What went wrong:

java.lang.StackOverflowError (no error message)

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

BUILD FAILED in 3m 54s

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

**All packages that i am using**
**expo cli version 9.2.0**
 "expo": "^46.0.19",
   "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-navigation/bottom-tabs": "^6.5.2",
    "@react-navigation/drawer": "^6.5.6",
    "@react-navigation/native": "^6.1.1",
    "@react-navigation/native-stack": "^6.9.7",
    "axios": "^1.2.2",
    "expo": "^46.0.19",
    "expo-av": "~13.0.2",
    "expo-device": "~5.0.0",
    "expo-image-picker": "~14.0.2",
    "expo-location": "~15.0.1",
    "expo-notifications": "^0.8.2",
    "expo-status-bar": "~1.4.2",
    "expo-system-ui": "~2.0.1",
    "react": "18.1.0",
    "react-native": "0.70.5",
    "react-native-dropdown-picker": "^5.4.4",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-image-slider-show": "^1.0.3",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-reanimated": "~2.12.0",
    "react-native-safe-area-context": "4.4.1",
    "react-native-step-indicator": "^1.0.3"

Hi @numanbuying

I think this is probably because the file called ./assets/back.png is not actually a PNG. e.g. maybe it’s a JPEG.

Try running file ./assets/back.png in your app’s root directory. If it’s not a PNG, either convert it into a PNG or rename it and see if that sorts out the problem.

2 Likes

Hey @wodin
Thanks for sharing the valuable experience bro its really helpful for me hope best for you .
if you don’t mind can you share your number and my is here +92 03264321272

Hi. I’m just an Expo user like you.

Maybe try registering for “office hours”:

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