尝试在 High Sierra 10.13.6 上运行 react-native cli

时间:2021-04-10 05:06:05

标签: react-native react-native-ios

以下是我使用的版本:

  • react-native-cli: 2.0.1
  • 反应原生:0.64.0
  • Xcode 10.1
  • cocoapods 版本:1.10.1

每当我运行 react-native run-ios

时,我都会收到此错误

构建失败

以下构建命令失败:
CompileC /Users/matthewharrison/Library/Developer/Xcode/DerivedData/LiveApp2-amxfqqouedceorcarxmrstlitata/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Objects-normal/x86_64/VirtualEventBase. /Users/matthewharrison/Desktop/dev/LiveApp2/ios/Pods/Flipper-Folly/folly/io/async/VirtualEventBase.cpp 普通 x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 次失败)

有什么我遗漏的吗?我已经用这个错误完成了我在这里看到的所有事情。现在我开始认为这与我的环境有关。我这样想有错吗?有没有人在 High Sierra 上成功运行过当前版本的 react native?

请帮助!

1 个答案:

答案 0 :(得分:0)

您使用的是本机版本 0.64

在 react-native 0.64 版本中,你需要使用 XCode 12

查看此官方公告https://reactnative.dev/blog/2021/03/12/version-0.64#major-dependency-version-changes

Major Dependency Version Changes

- Dropped Android API levels 16-20.
The Facebook app consistently drops support for Android versions with sufficiently low usage.
As the Facebook app no longer supports these versions and is React Native’s main testing surface, React Native is dropping support as well.
- Xcode 12 and CocoaPods 1.10 are required
- Minimum Node support bumped from 10 to Node 12
- Flipper bumped to 0.75.1