gradle version: 8.0.1
react native version: 0.75.4
Here's the hint from AGP Upgrade Assistant
This step is blocked
The upgrade assistant is unable to upgrade this project. You can upgrade AGP by manually completing the list of required upgrade steps.
- Cannot find AGP version in build files.
Cannot locate the version specification for the Android Gradle Plugin dependency, possibly because the project's build files use features not currently supported by the Upgrade Assistant (for example: using constants defined in buildSrc).
Also, it requires me to upgrade gradle to 8.7
After upgrading it the build failed
.gradle/wrapper/dists/gradle-8.7-bin/bhs2wmbdwecv87pi65oeuq5iu/gradle-8.7/lib/kotlin-stdlib-1.9.22.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
1 Answer 1
I had the same scenario and i solved it adding this dependencies lines in my android/build.gradle file:
buildscript {
...(existing code)
dependencies {
classpath('com.android.tools.build:gradle:8.4.2')
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("com.google.gms:google-services:4.3.15")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}
In the first dependency line you should indicate the actual version you should have of your AGP and then you could upgrade your AGP with the Android Studio assistant.
To determine what your AGP version should be, this may be helpful: https://developer.android.com/build/releases/gradle-plugin#groovy
Comments
Explore related questions
See similar questions with these tags.