I upgraded my react-native project from expo 48 to 50 and Gradle wrapper to 8.7 after resolving some other issues I am stuck on this issue:
`Execution failed for task ':expo-permissions:compileDebugKotlin'.
'compileDebugJavaWithJavac' task (current target is 17) and 'compileDebugKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
Things I tried:
- Using Java toolchain (https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support)
- Adding different plugins including
org.gradle.toolchains.foojay-resolver-convention - Adding
compatibilityOptionsandkotlinandkotlinOptionsblocks with hardCoded Java version andjvmToolchain(17) - Updating the Java version to 17 for gradle Settings -> Build, Execution, Deployment -> Gradle -> Gradle JDK
and many other things but nothing seems to help.