简体   繁体   中英

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:

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.

I am running the following react and react-native-versions

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

I also killed all processes that were running on localhost:8081

Edit: I got it working by downloading the old ios 8.1 simulator and setting it manually in 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 )

在此处输入图片说明

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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