在 iOS 上使用 Compose 时,打包 framework

2023-12-28  本文已影响0人  三天过去了

XCode 配置 KMM framework 打包

请参考官方文档

错误信息

e: Module "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64)" has a reference to symbol androidx.compose.runtime/remember|-2215966373931868872[0]. Neither the module itself nor its dependencies contain such declaration.

log.jpg

原因

这个 bug 是 Kotlin Native 的,可见 GitHub Issues

解决方案

这个 bug 在 Kotlin 1.9.20 修复了,可见 YouTrack
但在 1.9.20 之前,也可以通过在 gradle.properties 中添加以下代码解决

kotlin.native.cacheKind=none
上一篇 下一篇

猜你喜欢

热点阅读