Inconsistent JVM-target compatib

2024-09-12  本文已影响0人  MrDemo

错误信息
Execution failed for task ':module_soft:compileDebugKotlin'.

Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).

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.gradle
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
两个版本要对应上

上一篇 下一篇

猜你喜欢

热点阅读