EAS build: Gradle failure
Error text
Gradle build failed with unknown error. See logs for the "Run gradlew" phase. Error: Gradle build failed with unknown error.
Cause
The build breaks in the "Run gradlew" phase on the EAS cloud. The cause is usually a library, JDK or configuration mismatch.
Step-by-step fix
- Open the log of the "Run gradlew" phase on the EAS page and find the first
FAILURE:line. - Run
npx expo-doctor; it lists version mismatches. - Reproduce locally with
prebuildand./gradlew assembleRelease. - Resubmit with
--clear-cacheto drop stale caches. - Match the
imageand Node version ineas.jsonto your SDK.
Example commands
eas build --platform android --profile production --clear-cache npx expo-doctor cd android && ./gradlew assembleRelease --stacktrace # yerli təkrar
How to prevent it
After every SDK upgrade build locally first, then send it to the cloud.
Author and license: Nibras Code
- APK will not install
- What is a parse error?
- The keystore is lost
- The signatures do not match
- Package name error
- The APK file is damaged
- Play Protect blocks the app
- The package appears to be invalid
- Not enough storage
- The phone is not compatible
- An older version will not install
- XAPK will not install
- Gradle sync failed
- Could not resolve a dependency
- Duplicate class error
- Manifest merger failed
- Dex limit: 65536 methods
- R8: Missing class
- JDK version mismatch
- SDK location not found
- minSdkVersion conflict
- compileSdk is too low
- expo prebuild error
- Metro: Unable to resolve module
- Hermes: JS error only in release
- White screen in release
- Red screen: cannot reach Metro
- Expo SDK mismatch
- Capacitor sync error
- Capacitor: white screen
- EAS: keystore and credentials error
- Keystore was tampered with / wrong password
- Wrong key alias or password
- Play: signed with the wrong key
- INSTALL_FAILED_UPDATE_INCOMPATIBLE
- INSTALL_FAILED_VERSION_DOWNGRADE
- INSTALL_FAILED_INSUFFICIENT_STORAGE
- INSTALL_FAILED_NO_MATCHING_ABIS
- Parse error (problem parsing the package)
- "App not installed" error
- Installing an AAB file on a phone
- adb: device "unauthorized"
- adb: device not found
- adb server version mismatch
- Activity class does not exist
- Play: targetSdk level too low
- Play: permissions policy rejection
- Play: 64-bit requirement
- Play: versionCode already used
- ClassNotFound / NoSuchMethod crash
- OutOfMemoryError crash
- CLEARTEXT communication not permitted
- SecurityException: permission denied