美文网首页React Native
React-Native 新手踩坑(Print: Entry,

React-Native 新手踩坑(Print: Entry,

作者: 埃米莉Emily | 来源:发表于2017-07-07 18:02 被阅读4330次

RN新手根据官方文档跑Getting Started的例子,出现以下报错:

** 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"国内镜像安装导致boost1.63.0folly-2016.09.26.00文件不完整。

解决办法:重新下载boost1.63.0folly-2016.09.26.00,替换项目里的。

下载地址:.rncache下载
下载文件中包含了node_modules/react-native/third-party下的所有完整文件,可根据Xcode报错提示进行相应的文件替换。

或者试试,将下载好的.rncache里的三个文件放入Users/username(macOS 系统)目录下的.rncache,如果没有该目录。则使用mkdir .rncache 创建。

example.jpg

如果你Build Succeed,但仍有错误信息,以下链接可能对你有用:
https://github.com/facebook/react-native/issues/10401

相关文章

网友评论

  • _Nevermore:你好,哥们,能加个qq或微信啥的沟通一下吗,我也遇到了这个问题,但是没有得到解决。
  • Ths:楼主大大,请教一个问题哈,奇怪我的目录,node_modules/react-native下面没有third-party这个文件夹
    Ths:@埃米莉Emily 谢谢大佬
    埃米莉Emily:试下 rm -rf node_modules && npm i ,不行的话,试着下载文中附带的地址,里面有third-party,拷贝到自己项目

本文标题:React-Native 新手踩坑(Print: Entry,

本文链接:https://www.haomeiwen.com/subject/girrhxtx.html