简体   繁体   English

React Native无法构建示例项目(XCode 8.1 / Sierra)

[英]React Native can't build the sample project (XCode 8.1 / Sierra)

I just tried building the sample project for React-Native and I am getting the following error: 我刚刚尝试为React-Native构建示例项目,但出现以下错误:

The following build commands failed:
    Libtool /Users/computerName/project/react-native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTSettings.a normal x86_64
    Libtool /Users/computerName/project/react-native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTVibration.a normal x86_64
    Libtool /Users/computerName/project/react-native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTLinking.a normal x86_64
(3 failures)
Installing build/Build/Products/Debug-iphonesimulator/AwesomeProject.app
No devices are booted.
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

I've tried removing node_modules and doing a reinstall. 我试着删除node_modules并重新安装。

I am running the following react and react-native-versions 我正在运行以下react和react-native-versions

"react": "15.3.2",
"react-native": "0.36.0"

I also killed all processes that were running on localhost:8081 我还杀死了在localhost:8081上运行的所有进程localhost:8081

Edit: I got it working by downloading the old ios 8.1 simulator and setting it manually in Xcode: 编辑:我通过下载旧的ios 8.1模拟器并在Xcode中手动设置来使其工作:

将模拟器设置为ios 8.1

You have to open this project using xCode and check in general tab if Bundle Identifier is set (if not write something like com.myawesomeproject ) 您必须使用xCode打开该项目,并在general选项卡中检查是否设置了Bundle Identifier (如果未编写com.myawesomeproject类的com.myawesomeproject

在此处输入图片说明

ANISHs-MacBook-Air:watchman anishsnair$ ./autogen.sh 
./autogen.sh: line 9: aclocal: command not found
./autogen.sh: line 10: autoheader: command not found
./autogen.sh: line 11: automake: command not found
./autogen.sh: line 12: autoconf: command not found

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

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