I am using React-Native cli to develop my react native app but I have encountered an issue and there was no chance to get it fixed.
What I tried
remove nodemodules and package-lock.json and npm i
update react native and expo to latest version
sync project with android studio
What i receive when sync project in android studio
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
BUILD SUCCESSFUL
then go to VS code and cd android -> ./gradlew clean -> ./gradlew build
and get this error when run ./gradlew build :
Task :expo:compileDebugKotlin FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':expo:compileDebugKotlin'. A failure occurred while executing .jetbrains.kotlinpilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details
Try: 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. Get more help at .
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
android\build.gradle
buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:4.4.2'
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath(".jetbrains.kotlin:kotlin-gradle-plugin")
}
}
apply plugin: "com.facebook.react.rootproject"
package.json
"expo": "^52.0.19",
"react-native": "^0.78.1"
any suggestions would be appreciated.
UPDATE
I updated expo task manager to latest then got :
Task :expo:compileDebugKotlin FAILED
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task >':expo:compileDebugKotlin'. A failure occurred while executing >.jetbrains.kotlinpilerRunner.GradleCompilerRunnerWithWorkers$Grad>leKotlinCompilerWorkAction