[英]Kotlin multiplatform mobile - fail to run iOS project - missing one or more architectures required by this target
I create KMM(Kotlin multiplatform mobile) project using Android studio 4.1 RC3 and try to run the iOS App (with default code) but stuck with following error:我使用 Android studio 4.1 RC3 创建 KMM(Kotlin 多平台移动)项目并尝试运行 iOS 应用程序(使用默认代码)但遇到以下错误:
error: The linked and embedded framework 'shared.framework' is missing one or more architectures required by this target: arm64.
错误:链接和嵌入式框架“shared.framework”缺少此目标所需的一个或多个架构:arm64。 (in target 'iosApp' from project 'iosApp')
(在项目“iosApp”的目标“iosApp”中)
But when I just hit 'build', it get built successfully.但是当我点击“构建”时,它就成功构建了。 Only happening only when hit 'run' from Android studio.
仅当从 Android 工作室点击“运行”时才会发生。 Mean while I used Xcode to run the same project and face no issues getting it deployed into the simulator successfully.
同时,当我使用 Xcode 运行同一个项目时,将其成功部署到模拟器中没有遇到任何问题。
By the way I was following this official KMM guide https://kotlinlang.org/docs/mobile/create-first-app.html顺便说一句,我正在关注这个官方 KMM 指南https://kotlinlang.org/docs/mobile/create-first-app.html
Using Xcode 14 ( I tried simulators with iOS14,13.5,12.1) using Mac OS Catalina 10.15.6使用 Xcode 14(我尝试使用 iOS14、13.5、12.1 的模拟器)使用 Mac OS Catalina 10.15.6
This problem is most probably caused by Xcode 12 adding new simulator architectures.这个问题很有可能是Xcode 12 添加了新的模拟器架构引起的。 As a workaround, one can try adding
arm64
to the Disable Architectures
list in Build Settings
.作为一种解决方法,可以尝试将
arm64
添加到Build Settings
中的Disable Architectures
列表中。 See the related issue here在此处查看相关问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.