我只是试图启动一个新的反应原生应用程序,但没有运气。
react-native init NewApp cd NewApp npm安装 react-native run-ios
然后看下面的错误:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/arc/Desktop/websites-dev/react-native/testing_rn/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Objects-normal/x86_64/RCTProfile.o Profiler/RCTProfile.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/testing_rn.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/testing_rn.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
使用:
npm 4.1.2
node v7.5.0
El Capitan 10.11.6
Xcode 8.2
的package.json:
{
"name": "testing_rn",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "15.4.2",
"react-native": "0.42.3"
},
"devDependencies": {
"babel-jest": "19.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "19.0.2",
"react-test-renderer": "15.4.2"
},
"jest": {
"preset": "react-native"
}
}
看起来这可能与通过终端构建相关,但app仍然可以在xcode中工作?
github发布于25天前:
一些相关问题:
=============================================== ==========
更新
对我而言,这似乎与0.42.0及以上有关。我可以运行我用
安装的0.41.2项目react-native init --version 0.41.2 example412
cd example412
npm install
react-native run-ios
繁荣。有用。但这会出错:
react-native init example_latest
cd example_latest
npm install
react-native run-ios
然后上面的错误又回来了。与init版本相同的错误为0.42.0:
react-native init --version 0.42.0 example420
cd example420
npm install
react-native run-ios
答案 0 :(得分:0)
对我来说,我想我需要更新xcode。我以为我是8.3,但显然不是。在更新我的xcode之前,我还需要将osx更新到10.12.4。现在我很好,并在0.42.3
运行react-native init app