1

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.

  1. I cleared the cache with ./gradle clean.
  2. Ran prebuild with npx expo prebuild --clean.
  3. Removed my node_modules and package-lock.json and reinstalled the dependencies.
  4. Removed the /android, .expo, .gradle folders and generated them again.
  5. Tested updating Gradle to "https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip" (the default version is 8.13).
  6. 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).
  7. 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')
 }
}
asked Oct 23 at 18:24
5
  • Try running 'npx expo-doctor' and see what it says, try to solve the issues if any. Commented 2 days ago
  • What is the Expo version you are using? Commented 2 days ago
  • @tomerpacific i'm using expo 53.0.23 Commented yesterday
  • @Hubert - Have you thought about using the latest? Commented yesterday
  • Can you try "npx expo install --fix", then "npx expo prebuild --clean" and see if it works ? Commented yesterday

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.