XCODE 中的 Expo Build 给出错误:CompileSwiftSources 正常的 arm64 com.apple.xcode.tools.swift.compiler

San*_*ick 8 macos xcode compiler-errors react-native apple-m1

我正在尝试运行 expo 构建,以便可以在 XCode 模拟器中使用它。

我正在 Macbook M1 芯片上运行。

我只是从 xCode 打开 Expo 文件夹,然后尝试单击运行按钮,但出现以下错误:

Build fails with the below errors
The following build commands failed:
        CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'lottie-react-native' from project 'Pods')
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')
        CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')
        CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'expo-dev-menu' from project 'Pods')
        CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'expo-dev-launcher' from project 'Pods')
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/username/Library/Developer/Xcode/DerivedData/appname/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-84523FB004E42E06A56C6DE861F4376B.sh (in target 'FBReactNativeSpec' from project 'Pods')
Run Code Online (Sandbox Code Playgroud)

尝试了以下分辨率选项,但似乎不起作用

  1. 重新安装 pod 文件及其软件包,
  2. 从 xcode 中的项目中排除 arm64 arch
  3. 将架构更改为标准架构(包括 64 位)(armv7、armv7s、arm64)
  4. pod 更新、pod 分解、pod 安装
  5. 通过rosetta打开Xcode,将代码中pod文件中的arch改为arm64

版本: npm 版本 - 6.14.17 节点版本 - v14.19.2 expo 版本 -5.4.3 React-native 版本 - 7.0.3