React-native-fbsdk: Latest release 5.11.1 breaks app builds

Created on 22 Nov 2019  路  15Comments  路  Source: facebook/react-native-fbsdk

You can workaround the problem by adding facebookSdkVersion=5.11.0 to your android/gradle.properties to use the old version.

Version 5.11.1 is broken. This is what happens when you run react-native run-android:

```BUILD FAILED in 14s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

BUILD FAILED in 14s

at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (/Users/andrew/repos/rp/RP-Diet/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:75:39)
at buildAndRun (/Users/andrew/repos/rp/RP-Diet/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:169:41)
at then.result (/Users/andrew/repos/rp/RP-Diet/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:135:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

error Command failed with exit code 1.
```

Most helpful comment

Workaround: Making it easier to find @andrewzey
To make it work, you have to add facebookSdkVersion=5.11.0 to your android/gradle.properties to use the old version.

All 15 comments

Not working for me

it's working for me! thank

Not working for me too.

working. Thank you

Temp solution works, notice clean the project before rebuilding it.

working for me. thank you

Add another implementation to your App/build.gradle

implementation "com.facebook.android:facebook-android-sdk:5.11.0"

Hope this works

Add another implementation to your App/build.gradle

implementation "com.facebook.android:facebook-android-sdk:5.11.0"

Hope this works

I tried but didn't work with me, thanks!

Add another implementation to your App/build.gradle

implementation "com.facebook.android:facebook-android-sdk:5.11.0"

Hope this works

I tried but didn't work with me, thanks!

can you provide react, react-native, react-native-fbsdk version ?

Add another implementation to your App/build.gradle

implementation "com.facebook.android:facebook-android-sdk:5.11.0"

Hope this works

I tried but didn't work with me, thanks!

can you provide react, react-native, react-native-fbsdk version ?
"react": "16.8.6",
"react-native": "0.60.4",
"react-native-fbsdk": "^1.1.1",

Workaround: Making it easier to find @andrewzey
To make it work, you have to add facebookSdkVersion=5.11.0 to your android/gradle.properties to use the old version.

@Kailash23 Thanks. I'll update my post to put this info at the top to make it easier for folks to see.

@andrewzey Also, to be easier, maybe can share where in the code to actually put that, some people might not realize or know where to put it.

in your react-native project, android/build.gradle find :

buildscript {
ext {
// there should be a lot of things here, like buildToolVersion, minSdkVersion, etc.
// Add 1 more line below
facebookSdkVersion = "5.11.0"
}
}

UPDATE :
v5.11.2 was just released. You can use implementation 'com.facebook.android:facebook-core:5.11.2' to force the gradle to fetch the latest v5.11.2
https://github.com/facebook/facebook-android-sdk/issues/637#issuecomment-557442146

FWIW cocoapods still has 5.11.1 (verified with an updated repo) but it may just be release policy doesn't require lock-step releases between android & iOS

- FBSDKCoreKit 5.8.0 -> 5.8.0 (latest version 5.11.1)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

aurelienshz picture aurelienshz  路  4Comments

andfs picture andfs  路  5Comments

nlindeke picture nlindeke  路  5Comments

pranny picture pranny  路  6Comments

santilorenzo picture santilorenzo  路  3Comments