【发布时间】:2017-06-28 17:31:56
【问题描述】:
在 iOS 链接阶段,我开始看到我的 React Native 项目出现错误。
React Native 版本:0.41.2、0.40、0.39
一切正常,我编辑了 Android 版本,React Native 代码没有改变,当这种链接错误开始出现时,/node_modules/react-native/React/Base/{RCTHeaderName.h} 路径上的标头未找到:
In file included from /Users/user/ReactNativeProject/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:9:
../react-native/React/Base/RCTBridgeModule.h:12:9: fatal error: 'React/RCTDefines.h' file not found
#import <React/RCTDefines.h>
^
在 Link Binary With Libraries 中包含核心 React 库 (
libReact.a)。RCTLog.h的位置是PROJECTROOT/node_modules/react-native/React/Base/RCTLog.h,但是 导入是#import <React/RCTLog.h>将
React.xcodeproj新添加到库中没有帮助,Xcode 的Product > Clean没有帮助,重新启动 Xcode 也没有帮助react-native run-android有效,react-native run-ios显示错误文件权限设置给执行
react-native run-ios的用户
【问题讨论】:
标签: ios objective-c xcode react-native linker