react-native run-ios 失败



  • 初次安装,创建工程,结果运行失败了,失败原因,如下:

        ** BUILD FAILED **
    
     The following commands produced analyzer issues:
    Analyze /Users/cimi/PHZProject/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
    
    Analyze /Users/cimi/PHZProject/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
      (2 commands with analyzer issues)
    
     The following build commands failed:
    PhaseScriptExecution Install\ Third\ Party /Users/cimi/PHZProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
    (1 failure)
    
    Installing build/Build/Products/Debug-iphonesimulator/PHZProject.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/PHZProject.app/Info.plist
    Print: Entry, ":CFBundleIdentifier", Does Not Exist
    

    请问应该如何解决?



  • 是用了最新版本的react-native吧,改成0.44.3就好了



  • 此回复已被删除!


  • @luckykoo 怎么改?要重新安装吗?我是按照一个文档一步一步来操作的


  • administrators

    @KillerPeng 你确定你看过文档?
    0_1500000286733_QQ20170714-104336.png



  • @晴明 嗯,刚注意到后面这些内容,已经解决了,谢谢!



  • 项目工程版本
    react: 16.0.0-alpha.12
    react-native: 0.45.1

    npm版本4.6.1(必须这个版本)

    步骤:
    先翻墙执行 npm install;
    下载完,xcode运行会报boost错误

    解决方案:
    在GitHub中搜react-native-community/boost-for-react-native
    并替代工程中node_modules下react-native->third-party中boost包



  • 环境配置,如楼上。
    xcode运行失败,另一种解决方案。
    react-native 在iOS xcode运行之后third-party资源下载失败(应该是资源被墙了)
    在github 找到如下链接
    https://github.com/facebook/react-native/issues/14368
    在上面的链接页面搜索
    Managed to manually solve this by curling these into ~/.rncache

    将上述四个下载下来的四个后缀为。tar.gz包拷贝到用户目录下.rncache文件夹中(mac环境)
    然后再运行xcode

    补充:

    •   早期的OS X(10.6~10.8)系统可以使用如下两条命令来开始或者关闭系统隐藏文件的显示:
      

    defaults write com.apple.Finder AppleShowAllFiles Yes && killall Finder //显示隐藏文件
    defaults write com.apple.Finder AppleShowAllFiles No && killall Finder //不显示隐藏文件

    •   3
      

    当升级到OS X 10.9 Mavericks版本之后,这两条命令需要做一些修改,变成了如下命令:
    defaults write com.apple.finder AppleShowAllFiles Yes && killall Finder //显示隐藏文件
    defaults write com.apple.finder AppleShowAllFiles No && killall Finder //不显示隐藏文件


登录后回复