Calls to static methods in Java interfaces are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8'
这个问题出现在使用idea编译kotlin代码时(java项目)
需要在gradle中执行编译的版本
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileJava {
targetCompatibility = 1.8
sourceCompatibility = 1.8
}
本文来自博客园,作者:ukyo--夜王,转载请注明原文链接:https://www.cnblogs.com/ukzq/p/13813371.html