-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RN upgrade 0.69.9 -> 0.73.1 Task :gradle-plugin:compileKotlin FAILED #255
Comments
With the same issue, I'm also suffering. Please let me know if you know of any solution to this problem. Task :react-native-gradle-plugin:compileKotlin FAILED /node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (57, 42): Class 'kotlin.reflect.KClass' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0. The class is loaded from /Users/prakashkumarsingh_ttm/.gradle/wrapper/dists/gradle-8.3-all/6en3ugtfdg5xnpx44z4qbwgas/gradle-8.3/lib/kotlin-stdlib-1.9.0.jar!/kotlin/reflect/KClass.class |
I've had the same errors and it was because I'd left some files still in java. Make sure you no longer have any java files :
|
my workaround was to set in |
upgrading So the final configuration:
|
Hi, |
How do we modify into kotlin file |
I resolved this issue by changing the namespace in appname/android/app/build.gradle |
This solved my issue. |
still getting the issue FAILURE: Build failed with an exception.
|
I am seeing the same issue. Specifying the kotlinVersion or kotlin_version in android/build.gradle makes no difference. Given that the gradle version dictates the metadata kotlin version, I can only assume the solution is to align the expected-version of kotlin. The question is, how to reliably update the expected kotlin version to align with the version specified in gradles metadata. Please correct me if I'm wrong. |
got u any solution for this? |
Hi Pedro. I recommend following these steps:
Additional steps if you still see the problem:
|
Thank u, ArthurRuxton |
Environment
Things I’ve done to figure out my issue
Upgrading version
from 0.69.9 to 0.73.1
Description
error
(1) Class 'kotlin.~~~' was compiled with an incompatible version of kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1 (this error occured even though the version of kotlin is 1.7.10)
(2) Execution failed for task ':gradle-plugin:compileKotlin'.
my settings
react: 18.2.0
react-native: 0.73.1
android/build.gradle
gradle-wrapper.properties
The text was updated successfully, but these errors were encountered: