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