0

我試圖使用https://github.com/facebook/react-native-fbsdk了最新的反應本地0.47.1但以下所有安裝步驟後,我得到在Android以下編譯錯誤:反應母語-fbsdk編譯錯誤

/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 
 
    ^

任何想法可能會造成這種情況?

PS。 當我運行「react-native link」時,我也會得到以下內容,但這可能是因爲我沒有在Mac上運行,我必須稍後再確認一下。

[email protected]:~/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.

+0

有你嘗試了反應,本機fbsdk版本刪除fbsdk包並重新安裝它?你還需要重新運行鏈接 –

回答

0

可悲的是,這是一個已知的,當前的問題。

有與最近的react-native-fbsdk版本相當的幾個問題(全部爲不同的原因:0.5.00.6.00.6.1)。棘手的部分是某些版本在iOS上工作,而另一個版本僅在Android上運行,具體取決於您運行的RN的版本。

由於Facebook已經刪除的問題部分對他們的GitHub上,所有有用的信息分散在他們的bug跟蹤系統,即:在GitHub上

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

react-native問題,即:

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

Pull requests section對當前問題有一些啓發,即:

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

在這一點上,我建議要堅持[email protected]react-native0.46.4而上述所有得到解決。

0

降級使用

npm install [email protected] --save 

該鏈接後使用

react-native link react-native-fbsdk 

然後更新的反應,本機fbsdk

npm update react-native-fbsdk