简体   繁体   English

Xcode 12 Mac M1 和 Cocoapods:我可以在模拟器上构建,但不能在设备上构建

[英]Xcode 12 Mac M1 with Cocoapods: I can build on simulator but not on device

I have been searching a lot and most people seem to have the problem that they can run on the device but not on the simulator.我一直在搜索很多,大多数人似乎都有可以在设备上运行但不能在模拟器上运行的问题。 Well for me its the other way around.对我来说正好相反。

In order to get the cocoa pods to work using my new M1 Mac I added arm64 in excluded architectures.为了让 cocoa pod 使用我的新 M1 Mac 工作,我在排除的架构中添加了 arm64。 This works fine to run on the simulator.这可以很好地在模拟器上运行。 But when I try to run on a device I get the following error:但是当我尝试在设备上运行时,出现以下错误:

Red Error: Command PhaseScriptExecution failed with a nonzero exit code红色错误:命令 PhaseScriptExecution 失败,退出代码为非零

(I get this error in the "project section") (我在“项目部分”中收到此错误)

Yellow warning: None of the architectures in ARCHS (arm64) are valid.黄色警告:ARCHS (arm64) 中的架构均无效。 Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, arm64e, armv7, armv7s) which is not in EXCLUDED_ARCHS (arm64).考虑将 ARCHS 设置为 $(ARCHS_STANDARD) 或更新它以包含 VALID_ARCHS (arm64, arm64e, armv7, armv7s) 中的至少一个值,该值不在 EXCLUDED_ARCHS (arm64) 中。

(I get this warning in the "project section" as well as in the "Pods section") (我在“项目部分”和“Pods 部分”中收到此警告)

Anybody has any idea how this can be fixed?有人知道如何解决这个问题吗?

Wow my bad.哇我的坏。 My mistake was that I only removed "excluded architecture" from the project and I had to remove it from the pods also.我的错误是我只从项目中删除了“排除架构”,而且我还必须从 pod 中删除它。 Obviously.明显地。 Whoops哎呀

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我的 M1 Mac 上的 Xcode 试图为 `iOS Simulator-x86_64` 构建? 为什么它不是为基于“arm”的模拟器构建的? - Why is Xcode on my M1 Mac trying to build for `iOS Simulator-x86_64`? Why is it not building for an `arm` based simulator? Realm 应用程序在设备上编译,但不在 Xcode 12 上的模拟器上编译 - Realm app compiles on device but not on simulator on Xcode 12 无法在我的 M1 macbook 中安装 cocoapods-keys - can't install cocoapods-keys in my M1 macbook 在带有 M1 芯片的 Xcode 12 上的 scope 中找不到类型“*” - Cannot find type '*' in scope on Xcode 12 with M1 Chip Xcode 在 M1 MacBook Pro 上引发构建错误 - Xcode throws build error on M1 MacBook Pro Xcode 12 模拟器崩溃 - Xcode 12 simulator crash 如果不使用 rosseta,我无法使用 Apple Silicon m1 Pro 构建我的应用程序 - I can't build my app with apple silicon m1 pro without using rosseta 编译时,Apple MacBook Pro M1 上的 Xcode 中没有启动模拟器 - When compiling, the simulator does not start in Xcode on Apple MacBook Pro M1 Firebase 不在 M1 模拟器上构建(在范围内找不到“分析”) - Firebase doesn't build on M1 simulator (Cannot find 'Analytics' in scope) 如何使用Xcode 7.3为iOS 10设备构建? - How can I build for iOS 10 device with Xcode 7.3?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM