简体   繁体   English

React Native入门项目IOS构建失败

[英]React Native getting start project IOS build failed

I am getting following errors while creating first React Native project ( AwesomeProject ). 创建第一个React Native项目( AwesomeProject )时出现以下错误。 I have run this project on Android and it is working as expected. 我已经在Android上运行了该项目,并且按预期方式工作。 Please find the attached snapshots and guide me what is going wrong with IOS. 请找到所附的快照,并指导我IOS出了什么问题。

I was using Xcode 8 when getting errors I also updated my Xcode to 9.0 and Node etc.. but nothing got worked and all errors are same as I am getting since from start. 遇到错误时,我使用的是Xcode 8,我也将Xcode更新为9.0和Node等。

** BUILD FAILED **

The following build commands failed:
        CompileC /Users/clines291/RNProjects/AwesomeProject/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/Conv.o/Users/clines291/RNProjects/AwesomeProject/node_modules/react-native/third-party/folly-2016.09.26.00/folly/Conv.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
        CompileC /Users/clines291/RNProjects/AwesomeProject/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/StringBase.o /Users/clines291/RNProjects/AwesomeProject/node_modules/react-native/third-party/folly-2016.09.26.00/folly/StringBase.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)

Installing build/Build/Products/Debug-iphonesimulator/AwesomeProject.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-    iphonesimulator/AwesomeProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Attachments: 附件:
Visual Code build failed error 可视代码构建失败错误
Xcode build failed errors Xcode构建失败错误

Versions: 版本:
Xcode: 9.0 Xcode:9.0
Node: v8.6.0 节点:v8.6.0
Homebrew: 1.3.5 自制:1.3.5
Watchman: 4.9.0 守望者:4.9.0
react-native-cli: 2.0.1 react-native-cli:2.0.1
react-native: 0.49.3 反应本机:0.49.3
npm: 5.3.0 npm:5.3.0

have you tried using xcode 8 rather than xcode 9? 您是否尝试过使用xcode 8而不是xcode 9?

or if you still want to use xcode 9 try this 或者,如果您仍然想使用xcode 9,请尝试以下操作

rm -r ~/.rncache/
cd node_modules/react-native/third-party/glog-0.3.4/
./configure --host arm-apple-darwin


I found this solution on below mentioned link: 我在下面提到的链接上找到了此解决方案:
https://github.com/facebook/react-native/issues/14368 https://github.com/facebook/react-native/issues/14368
react-native init [PROJECT_NAME] --version 0.44.0 react-native初始[PROJECT_NAME]-版本0.44.0

This is C compiler problem 这是C编译器的问题 在此处输入图片说明

open xcode, select Build Settings > Build options, then enable c compiler works me. 打开xcode,选择“构建设置”>“构建选项”,然后启用c编译器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM