React Native & Expo errors · Error 04 of 12
EAS Build failed: “Gradle build failed with unknown error”
By Muhammad Abdullah, full-stack, mobile and ai automation developer · Last reviewed
Gradle build failed with unknown error. See logs for the “Run gradlew” phaseShort answer
The real error is earlier in the build log. Open the “Run gradlew” phase, search for the first “FAILURE” or “error:” line, and fix that cause — most often mismatched package versions, a library that is incompatible with your SDK, or a broken config plugin.
Common causes
- Expo and React Native packages that don’t match the installed SDK.
- An outdated native library that doesn’t support the current React Native / New Architecture.
- A config plugin or manual native change that fails during prebuild.
- Cached native files from an earlier configuration.
How to fix it
Check the project and align versions:
npx expo-doctor npx expo install --checkReproduce locally to get a readable error:
npx expo prebuild --clean npx expo run:androidUpdate or replace the library named in the first error, then rebuild without cache:
eas build --platform android --clear-cache