我正在使用React Native 0.37.0 (因为我的项目使用的是react-native-navigation , 0.40.0支持RN> = 0.40.0 )并尝试使用Facebook SDK。
我完全遵循了react-native-fbsdk的npm页面上的指令步骤; 并进行双重检查以确保安装完所有内容,并添加所有搜索路径等。
在XCode中运行我的项目时,我在RCTFBSDK库中RCTFBSDK错误。 在文件RCTFBSDKAppEvents.h : RCTFBSDKAppEvents.h 'React/RCTBridgeModuke.h' file not found 。
该文件中的导入行是React 0.40.0的新语法:
#import <React/RCTBridgeModule.h>
有什么办法可以让这些版本的框架一起玩吗? 我需要导航库和脸谱库,所以直到我找到解决方案我才完全被阻止。
我可以分享任何其他东西来支持答案,只要问一下。
I'm using React Native 0.37.0 (because my project uses react-native-navigation which is yet to support RN >= 0.40.0) and attempting to use the Facebook SDK.
I've followed the instruction steps on react-native-fbsdk's npm page, fully; and double-checked to ensure everything is installed, all the search paths are added etc.
When running my project in XCode I get a Buildtime error in the RCTFBSDK library. In the file RCTFBSDKAppEvents.h: 'React/RCTBridgeModuke.h' file not found.
The import line in that file is the new syntax for React 0.40.0:
#import <React/RCTBridgeModule.h>
Is there anything that I can do to make these versions of frameworks play together? I need the navigation library and the facebook one, so until I find a solution I'm completely blocked.
Anything else I can share to support an answer, just ask.
最满意答案
可能是因为您运行的是react-native-fbsdk的最新版本,该版本仅适用于RN >= 0.40 。
尝试卸载react-native-fbsdk:
npm uninstall react-native-fbsdk --save
然后,使用旧版本重新安装:
npm install react-native-fbsdk@0.4.0 --save
Probably because you are running the latest version of react-native-fbsdk which only works with RN >= 0.40.
Try uninstall react-native-fbsdk:
npm uninstall react-native-fbsdk --save
Then, reinstall with an older version:
npm install react-native-fbsdk@0.4.0 --save
更多推荐
发布评论