[英]How To Set Android JVM Target Compability in Kotlin Multiplatform Mobile Project
As the title of this question describes, I get a warning when building the Android app of my KMM project that hints me to set my JVM version to 11 as the following terminal output shows:正如这个问题的标题所描述的,我在构建我的 KMM 项目的 Android 应用程序时收到一条警告,提示我将我的 JVM 版本设置为 11,如以下终端 output 所示:
> Task :shared:compileDebugKotlinAndroid
'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlinAndroid' task (current target is 11) jvm target compatibility should be set to the same Java version
But how can I do that?但是我该怎么做呢? Setting it like you'd do it in a regular Android project doesn't seem to have an effect.
像在常规 Android 项目中那样设置它似乎没有效果。
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { kotlinOptions.jvmTarget = "11" }
It is only advisory property, you could safely delete it.它只是建议属性,您可以安全地删除它。
minSdk
is enough. minSdk
就足够了。 See LibraryBaseFlavor reference deprecation message.请参阅LibraryBaseFlavor 参考弃用消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.