good afternoon!
I've been trying to generate an APK of my React Native Expo Dev Client app for days, and I'm stuck on the same error. I managed to generate it successfully the first time using EAS Build, and it worked. However, one day I woke up, tried to generate it again, without changing any configuration in the application, and it simply hits the same error:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. BUILD FAILED in 2m 13s Error: Gradle build failed with unknown error.
I've tried everything! I've looked for solutions online but nothing works.
- I cleared the cache with
./gradle clean. - Ran prebuild with
npx expo prebuild --clean. - Removed my
node_modules andpackage-lock.jsonand reinstalled the dependencies. - Removed the /android, .expo, .gradle folders and generated them again.
- Tested updating Gradle to "
https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip" (the default version is 8.13). - Tested defining a version for
classpath("com.android.tools.build:gradle:8.5.1")(when I generate /android it comes without a version by default). - Installed libs that could conflict, like
react-native-google-signin.
I'm using Expo version 53.0.23, React-Native version 0.79.6 and Gradle - 8.13 on Windows 10.
When I run it on my emulator with npx expo run:android it works fine!
All steps work and return no errors. **EXCEPT **when I try to generate the APK with the command eas build -p android --profile production.
My project is on Github at the following link: https://github.com/bycmlla/PsyRPG.git
In the psyrpg/ERROR INFORMATIONS folder there is the error log in .txt and screenshots from my Expo account.
Below are some code snippets with the Gradle versions.
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:4.4.1'
classpath('com.android.tools.build:gradle')
classpath('com.facebook.react:react-native-gradle-plugin')
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
}
}
-
Try running 'npx expo-doctor' and see what it says, try to solve the issues if any.Abdul_Basit– Abdul_Basit2025年10月24日 06:02:46 +00:00Commented 2 days ago
-
What is the Expo version you are using?tomerpacific– tomerpacific2025年10月24日 07:54:31 +00:00Commented 2 days ago
-
@tomerpacific i'm using expo 53.0.23Hubert– Hubert2025年10月24日 22:01:16 +00:00Commented yesterday
-
@Hubert - Have you thought about using the latest?tomerpacific– tomerpacific2025年10月25日 06:04:55 +00:00Commented yesterday
-
Can you try "npx expo install --fix", then "npx expo prebuild --clean" and see if it works ?Jul– Jul2025年10月25日 14:35:52 +00:00Commented yesterday