小工具知识网

当前位置: 首页 > 行业知识 > Android Stdio Execution failed for task ‘:app:compileDebugKotlin‘ 报错解决

行业知识

Android Stdio Execution failed for task ‘:app:compileDebugKotlin‘ 报错解决

2026-11-04 12:57:26 来源:互联网转载

具体报错信息如下:

'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.

很显然,这是一个版本冲突问题,compileDebugJavaWithJavac版本是1.8,compileDebugKotlin是17。我们只需将这两个版本改成同一个即可,在build.gradle中添加以下代码:

kotlinOptions {        jvmTarget = "1.8"    }

如下图所示:

上一篇:接受邮件服务器怎么查?

下一篇:远程操作服务器怎么搞?