新的React-Native项目:构建失败(iOS)

时间:2020-04-27 18:51:28

标签: ios react-native

我正在使用: react-native-cli:2.0.1 反应本机:0.62.2 Xcode:11.3.1

创建一个本机项目(react-native init GetAway)并开始 npx react-native run-ios引发构建错误:

The following build commands failed:
    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
    CompileSwift normal x86_64 /Users/sercan/Desktop/Arbeit/Urlaub/rescue/GetAway/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift
(2 failures)

我不知道为什么要为新创建的项目生成错误。 如果您有解决此问题的想法,请告诉我。

预先感谢

编辑:链接以获取完整的错误消息:https://docs.google.com/document/d/1o6tj9OrWmH-OZ5rCkYxhQTi-RYH36S5u36zpmBHHY3E/edit?usp=sharing

2 个答案:

答案 0 :(得分:2)

在我的macOS系统中,重新启动计算机已解决了此构建错误。已在https://github.com/facebook/react-native/issues/28777上报告了此问题,我也在此找到了解决方法。

答案 1 :(得分:0)

我通过卸载全局安装的react-native-cli解决了这一问题。 react-native环境设置文档也对此进行了说明。

React Native Environment Setup Docs

Screenshot from the environment setup docs