ReactNative踩坑系列--构建失败

初始化项目后执行react-native run-ios,构建失败:

** BUILD FAILED **


The following commands produced analyzer issues:

    Analyze /Users/lcz/workspace/APP/temp/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
    Analyze /Users/lcz/workspace/APP/temp/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
(2 commands with analyzer issues)

The following build commands failed:
    PhaseScriptExecution Install\ Third\ Party /Users/lcz/workspace/APP/temp/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/temp.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/temp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

上网查了很多资料没有找到解决方案,估计是react-native版本的问题。

测试版本:

"react": "16.0.0-alpha.12",
"react-native": "0.45.0"

切换成下面的版本就可以了:

"react": "16.0.0-alpha.6",
"react-native": "0.44.3"

具体操作:删除node-modules文件夹,修改pakage.json文件,然后执行npm install

 

注意:react版本要和react-native版本搭配,上面版本只换一个也会出错

 

转载于:https://www.cnblogs.com/dragon-aslan/p/6965014.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值