I just updated my react-native project to 0.72 and i am facing issue with my TurboModule. I did add
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
in my project's build.gradle as well as in turbomodule's build.gradle file.
I also changed build.gradle.kts
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion
apiVersion = "1.5"
languageVersion = "1.5"
}
}
Updated the same in android studio as well

Entire source code here
change java version from 17 to 11 it will work change in your app.gradle java version like this
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
and download Javajdk 11 version like this 
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With