react-native-fbsdk compilation error

1.4k views Asked by At

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:

/home/gerhard/Projects/bounzapp/node_modules/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java:61: error: method does not override or implement a method from a supertype
    @Override
    ^

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.

gerhard@linux-clqp:~/Projects/bounzapp> react-native link
Scanning 680 folders for symlinks in /home/gerhard/Projects/bounzapp/node_modules (10ms)
rnpm-install info Android module react-native-fbsdk is already linked
rnpm-install info Linking react-native-fbsdk ios dependency
rnpm-install ERR! Something went wrong while linking. Error: Expected "/*", "//", or "{" but "<" found.
Please file an issue here: https://github.com/facebook/react-native/issues

Expected "/*", "//", or "{" but "<" found.

2

There are 2 answers

0
designorant On BEST ANSWER

Sadly this is a known, and current issue.

There was quite a few issues with the recent releases of react-native-fbsdk (all for different reasons: 0.5.0, 0.6.0, and 0.6.1). The tricky part is that some versions work on iOS while the other work on Android only depending on the version of RN that you run.

Since Facebook has removed Issues section on their GitHub, all the helpful information is scattered across their bug tracker, i.e.:

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

and react-native Issues on GitHub, i.e.:

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

Pull requests section shines some light on current issues, i.e.:

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

At this point I'd recommend to stick to [email protected] on react-native0.46.4 while all the above is resolved.

0
irna On

Downgrade the react-native-fbsdk version using

npm install [email protected] --save

after that link using

react-native link react-native-fbsdk

then update the react-native-fbsdk

npm update react-native-fbsdk