RN新手根據(jù)官方文檔跑Getting Started的例子,出現(xiàn)以下報(bào)錯:
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Run\ Script /development/misc/react/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
(1 failure)
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
/development/misc/react/AwesomeProject/node_modules/promise/lib/done.js:10
throw err;
^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
問題所在:"react-native": "0.45.1"
國內(nèi)鏡像安裝導(dǎo)致boost1.63.0
和folly-2016.09.26.00
文件不完整臣疑。
解決辦法:重新下載boost1.63.0
和folly-2016.09.26.00
晚凿,替換項(xiàng)目里的漓骚。
下載地址:.rncache下載
下載文件中包含了node_modules/react-native/third-party
下的所有完整文件戏罢,可根據(jù)Xcode報(bào)錯提示進(jìn)行相應(yīng)的文件替換字币。
或者試試疾掰,將下載好的.rncache里的三個文件放入Users/username
(macOS 系統(tǒng))目錄下的.rncache覆积,如果沒有該目錄听皿。則使用mkdir .rncache
創(chuàng)建。
example.jpg
如果你Build Succeed宽档,但仍有錯誤信息尉姨,以下鏈接可能對你有用:
https://github.com/facebook/react-native/issues/10401