0

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.

asked Oct 10, 2024 at 14:28
0

1 Answer 1

0

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

answered Dec 27, 2024 at 19:18
Sign up to request clarification or add additional context in comments.

Comments

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.