应用程序未在 iOS 上运行以获得最新版本的 react-native [英] App is not running on iOS for latest version of react-native

查看:42
本文介绍了应用程序未在 iOS 上运行以获得最新版本的 react-native的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新项目无法在 iOS 上构建.

用 react-native init [项目名称] 创建新项目然后使用 react-native run-ios 运行,并在终端上遇到以下问题,

Create new project with react-native init [Project Name] then run using react-native run-ios, and got below issues on terminal,

** 构建失败 **

以下命令产生了分析器问题:分析/Volumes/mac\data/react/UpdateVersion/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c分析/Volumes/mac\data/react/UpdateVersion/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c(2 个带有分析器问题的命令)

The following commands produced analyzer issues: Analyze /Volumes/mac\ data/react/UpdateVersion/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c Analyze /Volumes/mac\ data/react/UpdateVersion/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c (2 commands with analyzer issues)

以下构建命令失败:PhaseScriptExecution Install\第三方\第三方/Volumes/mac\ data/react/UpdateVersion/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh(1 次失败)

The following build commands failed: PhaseScriptExecution Install\ Third\ Party /Volumes/mac\ data/react/UpdateVersion/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh (1 failure)

安装build/Build/Products/Debug-iphonesimulator/UpdateVersion.app 一个错误遇到处理命令 (domain=NSPOSIXErrorDomain,code=2): 无法安装请求的应用程序一个应用程序在提供的路径中找不到包.提供一个有效的路径所需的应用程序包.打印:条目,:CFBundleIdentifier",是否不存在

Installing build/Build/Products/Debug-iphonesimulator/UpdateVersion.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

命令失败:/usr/libexec/PlistBuddy -c 打印:CFBundleIdentifierbuild/Build/Products/Debug-iphonesimulator/UpdateVersion.app/Info.plist打印:条目,:CFBundleIdentifier",不存在

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/UpdateVersion.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist

其他信息

  • React Native 版本:0.46.4
  • 平台:iOS
  • 开发操作系统:macOS Sierra 10.12.5
  • 开发工具:Xcode 8.3.3

推荐答案

这是我最近在 iOS 上遇到这些错误时所做的.运行这些命令可帮助我删除导致问题的文件夹.

Here is what I have done when I get these errors recently on iOS. Running these commands help me to remove the folder that is causing the problem.

rm -r ~/.rncache

转到项目目录中的此文件夹.

Go this folder in your project directory.

cd /node_modules/react-native/third_party

然后为 url 下载这些文件.

Then download these files for the url.

https://github.com/google/glog/archive/v0.3.4.tar.gz
https://github.com/google/double-conversion/archive/v1.1.5.tar.gz
https://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gz
https://github.com/facebook/folly/archive/v2016.09.26.00.tar.gz

现在从第三方文件夹中替换这些文件,在 Xcode 中清理构建并运行代码.如果这些步骤导致另一个错误,请告诉我,因为我在执行此操作后遇到了其他问题.但是,我的问题以这种方式解决了.

Now replace these files from the third party folder, clean the build in Xcode and run the code. If these steps lead to another error, do let me know as I have faced other issues after doing this. But, my problem was resolved in this manner.

这篇关于应用程序未在 iOS 上运行以获得最新版本的 react-native的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆