编译依赖于React Native0.46.4的React Native IOS工程时,出现错误“fatal error: 'React/RCTEventEmitter.h' file not fou...

我的环境:

WebStorm 2017.2
Build #WS-172.3317.70, built on July 14, 2017

JRE: 1.8.0_152-release-915-b5 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Mac OS X 10.12.6

Xcode8.3.3(8E3004b)

 

网上搜索,可以解决我的问题的网址:https://stackoverflow.com/questions/41663002/react-rctbridgemodule-h-file-not-found

搬运如下:

In my case this particular problem happened when I was trying to archive a 0.40+ react-native app for iOs (solution was found here: https://github.com/facebook/react-native/issues/11721#issuecomment-270672904).

What happened was that xCode was trying to build the react-native libraries in parallel and was building libraries with implicit react dependencies before actually building the react library.

The solution in my case was to:

  1. Disable the parallel builds:

    • xCode menu -> Product -> Scheme -> Manage Shemes...
    • Double click on your application
    • Build tab -> clear the tick on Pallelize Build
  2. Add react as a project dependecy

    • xCode Project Navigator -> drag React.xcodeproj from Libraries to root tree
    • Build Phases Tab -> Target Dependencies -> + -> add React

转载于:https://www.cnblogs.com/yangruishan/p/7265029.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值