React-Native 新手踩坑(Print: Entry, ":CFBundleIdentifier", Does Not Exist)

RN新手根據(jù)官方文檔跑Getting Started的例子,出現(xiàn)以下報錯:

** 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)鏡像安裝導致boost1.63.0folly-2016.09.26.00文件不完整。

解決辦法:重新下載boost1.63.0folly-2016.09.26.00,替換項目里的。

下載地址:.rncache下載
下載文件中包含了node_modules/react-native/third-party下的所有完整文件,可根據(jù)Xcode報錯提示進行相應的文件替換。

或者試試,將下載好的.rncache里的三個文件放入Users/username(macOS 系統(tǒng))目錄下的.rncache,如果沒有該目錄。則使用mkdir .rncache 創(chuàng)建。

example.jpg

如果你Build Succeed,但仍有錯誤信息,以下鏈接可能對你有用:
https://github.com/facebook/react-native/issues/10401

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容