简体   繁体   English

Kotlin 多平台移动 - 无法运行 iOS 项目 - 缺少此目标所需的一个或多个架构

[英]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.

相关问题 框架“shared.framework”缺少此目标所需的一个或多个架构:arm64。 Xcode 12.0 kotlin 1.4.10 - framework 'shared.framework' is missing one or more architectures required by this target: arm64. Xcode 12.0 kotlin 1.4.10 iOS 依赖项在 Kotlin 多平台项目中未解决 - iOS dependences not resolving in Kotlin MultiPlatform Project iOS cocoaods 框架未在 Kotlin 多平台项目中生成 - iOS cocoaods framework not generating in Kotlin Multiplatform project 用于 Kotlin 多平台移动设备的 Skia - Skia for Kotlin multiplatform mobile 是否可以创建一个引用公共模块的正确目标的 kotlin 多平台项目? - Is it possible to create a kotlin multiplatform project referencing the correct target of a common module? 在 Kotlin 多平台移动项目中访问设备和操作系统信息 - Access Device and OS information in a Kotlin Multiplatform mobile Project Kotlin 多平台项目 - Kotlin multiplatform project 如何为 Kotlin Multiplatform 移动项目有效地保持 RAM 中的连续内存 - How to keep efficiently continuous memory in RAM for Kotlin Multiplatform mobile project 从项目目录读取本地文件 | Kotlin 多平台手机 | 知识管理系统 - Read local file from project directory | Kotlin Multiplatform Mobile | KMM 用于新项目的 Kotlin Multiplatform Mobile 插件向导:下一步按钮已禁用 - Wizard of Kotlin Multiplatform Mobile plugin for a new project: Next button is disabled
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM