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.
原因
这个 bug 是 Kotlin Native 的,可见 GitHub Issues
解决方案
这个 bug 在 Kotlin 1.9.20 修复了,可见 YouTrack
但在 1.9.20 之前,也可以通过在 gradle.properties
中添加以下代码解决
kotlin.native.cacheKind=none