码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2017-08-01 14:25:09      阅读:5271      评论:0      收藏:0      [点我收藏+]

标签:disable   react   nav   event   bridge   tab   strong   http   rar   

我的环境:

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

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

标签:disable   react   nav   event   bridge   tab   strong   http   rar   

原文地址:http://www.cnblogs.com/yangruishan/p/7265029.html

(2)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!