Kotlin 多平台错误:共享:linkDebugFrameworkIosSimulatorArm64

fro*_*ots 7 android ios kotlin kotlin-multiplatform

我设置了 KMP 项目,但无法启动 iOS 模拟器。安卓运行完美。当尝试运行 iOS 时,以下 gradle 任务失败:

The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
ld: unknown options: -ios_simulator_version_min -sdk_version 
Run Code Online (Sandbox Code Playgroud)

创建项目后我没有对其进行任何更改。

Kev*_*gan 14

您可能使用的是 Xcode 15 和旧版本的 Kotlin。如果使用的是 Xcode 15,请将 Kotlin 升级到 1.9.10。或者,安装 Xcode 14.3.1。

  • 请注意,您使用的是 Compose,需要将编译器插件版本更新到 1.5.3,以便与 Kotlin 1.9.10 兼容。 (2认同)