Was kann ich bei folgendem Fehler in Android Studio machen?
Ich bekomme in Android Studio beim Committen folgende Fehlermeldung:
Running git pre-commit hook
***************************
> Task :buildSrc:compileKotlin FAILED
FAILURE: Build failed with an exception.
* 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
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 1s
1 actionable task: 1 executed
ktlintCheck failed
2 Antworten
Du musst eine gültige Versionsnummer für jvmTarget eintragen.
https://youtrack.jetbrains.com/issue/KT-57669/Add-Java-20-to-JvmTarget
PHind meint: "The error "Unknown Kotlin JVM target: 20" is caused because the Kotlin compiler does not recognize the target JVM version specified in your project's configuration. According to the Kotlin compiler options, the valid JVM target versions are 1.6, 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, and 19 kotlinlang.org. Therefore, setting the JVM target to 20 is not currently supported."
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}