'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.
Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain
解决:
在导入的module的gradle android{ }中加入
kotlinOptions { jvmTarget = '1.8' }