[英]Upgrading to Jetpack Compose 1.0.0-alpha12 with Kotlin 1.4.30 error
After upgrading to Jetpack Compose 1.0.0-alpha12 with Kotlin 1.4.30, also with Activity 1.3.0-alpha02
fix for setContent
, but still got an error在使用 Kotlin 1.4.30 升级到 Jetpack Compose 1.0.0-alpha12 后,还对setContent
进行了Activity 1.3.0-alpha02
修复,但仍然出现错误
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
> 2 files found with path 'META-INF/AL2.0' from inputs:
Had to use the workaround to make it built不得不使用解决方法来构建它
packagingOptions {
exclude 'META-INF/AL2.0'
exclude 'META-INF/LGPL2.1'
}
And also have the warning Flag is not supported by this version of the compiler: -Xallow-jvm-ir-dependencies
并且还有Flag is not supported by this version of the compiler: -Xallow-jvm-ir-dependencies
No matter keeping freeCompilerArgs += ["-Xallow-jvm-ir-dependencies"]
under kotlinOptions
or not无论是否在 kotlinOptions 下保留kotlinOptions
freeCompilerArgs += ["-Xallow-jvm-ir-dependencies"]
The issue got fixed once upgrading to Compose 1.0.0-beta01
.该问题在升级到 Compose 1.0.0-beta01
后得到解决。 No workaround needed.无需解决方法。
Once I upgraded to Compose 1.0.0-beta01, kotlin.collections such as arrayListOf, listOf, ... are not implicity imported anymore.一旦我升级到 Compose 1.0.0-beta01,kotlin.collections 诸如 arrayListOf、listOf、...之类的将不再隐式导入。 Did it occur to you too?你也发生过吗?
You must use compatible versions of compose and Kotlin.您必须使用 compose 和 Kotlin 的兼容版本。 Compose beta08 and Kotlin 1.5.10 are compatible Compose beta08 和 Kotlin 1.5.10 兼容
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.