![](/img/trans.png)
[英]new react-native (0.70.1 ) init can't build iOS project
[英]Can't build and run react-native project on Mac
提到这个问题,我有同样的问题。 我有VMware的MacOs El Captain。
我有两个问题:-尝试init
一个新的react-native项目时,软件包的获取挂起了从回购中获取react-native 0.46.4软件包的过程。 其他软件包已成功下载。 因此,我已经从Windows执行npm install
,然后在Mac上复制了node_modules
文件夹。 -尝试在iOS模拟器上运行项目时,出现以下错误:
**建立失败**
...
In file included from /Users/michelebombardi/Desktop/ReactNativeProjects/caliup/node_modules/react-native/React/../third-party/folly-2016.09.26.00/folly/Bits.h:70:
/Users/michelebombardi/Desktop/ReactNativeProjects/caliup/node_modules/react-native/React/../third-party/folly-2016.09.26.00/folly/detail/BitIteratorDetail.h:21:10: fatal error: 'boost/iterator/iterator_adaptor.hpp' file not found
#include <boost/iterator/iterator_adaptor.hpp>
The following build commands failed:
CompileC /Users/michelebombardi/Desktop/ReactNativeProjects/caliup/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/Conv.o /Users/michelebombardi/Desktop/ReactNativeProjects/caliup/node_modules/react-native/third-party/folly-2016.09.26.00/folly/Conv.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/CaliUp.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/CaliUp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist`
我真的需要在一周结束前在应用商店上发布我的应用。 我已经尝试了所有建议的解决方案,但没什么用。
有人可以帮我吗?
首先尝试一下:watchman watch-del-all && rm -rf node_modules
如果使用Homebrew安装节点,请从此处卸载并从此处安装节点。( https://nodejs.org/en/ )
现在,如果您使用yarn来安装节点模块:尝试npm install
也许这会工作。 请尝试以下步骤:
从ios文件夹备份您的图标,图像等。
检查{project-root} \\ app.json文件中的键“ name”是否设置了应用程序名称。
删除ios /和android /目录
运行本机弹出
替换先前复制的图标,图像等
运行本机链接
使用快捷键Command + R从Xcode启动您的应用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.