react-native-fbsdk compilation error

时间:2017-08-30 20:58:58

标签: android facebook react-native react-native-android react-native-fbsdk

I am trying to use https://github.com/facebook/react-native-fbsdk with the latest react-native 0.47.1 but am getting the following compilation error on Android after following all the installation steps:

except

Any idea what could be causing this?

PS. When I run "react-native link" I also get the following but it might because I'm not running on a Mac, I'll have to confirm that later.

http://localhost:8080/myScholarship/Register

2 个答案:

答案 0 :(得分:1)

使用

降级react-native-fbsdk版本
npm install react-native-fbsdk@0.6.0 --save

之后使用

链接
react-native link react-native-fbsdk

然后更新react-native-fbsdk

npm update react-native-fbsdk

答案 1 :(得分:0)

可悲的是,这是一个众所周知的当前问题。

最近发布的react-native-fbsdk版本存在不少问题(所有原因各有不同:0.5.00.6.00.6.1)。棘手的部分是某些版本在iOS上工作,而另一个版本在Android上工作,这取决于您运行的RN版本。

由于Facebook已经删除了GitHub上的问题部分,所有有用的信息都散布在他们的bug跟踪器中,即:

https://developers.facebook.com/bugs/257149274778275/ https://developers.facebook.com/bugs/126967157938007/

react-native关于GitHub的问题,即:

https://github.com/facebook/react-native/issues/14670

Pull requests部分对当前问题有所了解,即:

https://github.com/facebook/react-native-fbsdk/pull/339

此时我建议坚持react-native-fbsdk@0.5.1 react-native0.46.4,而上述所有内容都已解决。