Facebook Sdk Android Error Building

后端 未结 7 1970
北荒
北荒 2020-12-04 16:46

I am trying to build my react-native project and using react-native fbsdk.

However, I get these errors:

/home/luiz/MYP/app/node_modu         


        
7条回答
  •  無奈伤痛
    2020-12-04 17:26

    Apparently facebook has updated their sdk yesterday and the latest (4.23.0) sdk may have a bug or something.

    You can resolve this by Changing your node_modules\react-native-fbsdk\android\build.gradle from:

    compile('com.facebook.android:facebook-android-sdk:4.+')
    

    To:

    compile('com.facebook.android:facebook-android-sdk:4.22.1')
    

    I'm no gradle guy so if someone knows of a better way of forcing the version from parent gradle.build, please comment and I'll update the answer.

    ** EDIT **

    @Andreyco managed to solve this without changing node_modules. You can scroll down to his answer or click here.

    Also, as notified by @JuanJoseTugores there's a pull request in react-native-fbsdk waiting to be approved, so you can check the bug's progress and be notified when it's resolved.

    ** Another Update **
    Facebook closed the bug that was opened for them regarding this issue, saying they fixed the sdk. So now all the workarounds can be removed.

    Apparently FB still not solved this. We just upgraded to RN 0.44 & FB 0.6.0

提交回复
热议问题