Got "Unknown Kotlin JVM target: 20" when running "gradle build"

Hi team,

I got an issue when running gradle build. The error messages show that:

* What went wrong:
Execution failed for task ':buildSrc:compileKotlin'.
> Error while evaluating property 'compilerOptions.jvmTarget' of task ':buildSrc:compileKotlin'.
   > Failed to calculate the value of property 'jvmTarget'.
      > Unknown Kotlin JVM target: 20

Does anyone know how to resolve it?

Don’t run Gradle with a Java version it is not compatible with: Compatibility Matrix

Thanks Vampire! I switch the java version to an earlier one and the issue was resolved.

1 Like