解决M1 Mac 编译失败

问题1

M1 Mac pro Xcode编译工程报错libPods-ProjectName.a' is missing one or more architectures required by this target: x86_64

解决方案

For me opening Xcode in Rosetta mode was what solved the problem. You may have to remove DerivedData also at: /Users/<username>/Library/Developer/Xcode/DerivedData

You can install Rosetta by running: softwareupdate --install-rosetta

Also it seems OS prompts you to install if trying to open an app that requires Rosetta: https://support.apple.com/en-us/HT211861

参考

https://stackoverflow.com/a/69294780



问题2

M1 Mac pro Xcode改为 Rosetta,编译Playground报错
Failed to launch process. Failed to attach to stub for playground execution: error: debugserver is x86_64 binary running in translation, attached failed..

解决方案

It seems that you should turn off running with Rosetta for Xcode.

参考

https://stackoverflow.com/questions/69829731/xcode-playground-failed-to-launch

问题3

File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a

解决方案

config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容