Execution failed for task ':GabiaDaaSClient:compileDebugKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).
* Try:
> 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.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':GabiaDaaSClient:compileDebugKotlin'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:130)
와 같은 에러
Java와 Kotlin의 JVM 타겟 버전이 일치하지 않아서 발생
compileDebugJavaWithJavac 작업은 JVM 타겟 버전 1.8을 사용하고 있지만, compileDebugKotlin 작업은 JVM 타겟 버전 17을 사용하려고 하여 호환성 문제가 발생한 것
build.gradle(Module) 부분의 android 부분에 추가
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
'Android > 에러 모음' 카테고리의 다른 글
gradle version error (0) | 2025.03.13 |
---|---|
error: package R does not exist (1) | 2025.02.11 |
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin 'com.android.internal.application'. 에러 (0) | 2024.12.03 |
안드로이드 failed to connect to socket 에러 (2) | 2024.10.16 |
adb 명령어 인식 오류 에러 (2) | 2024.10.07 |