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.
What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not find com.facebook.android:facebook-core:5.11.1.
Searched in the following locations:
- file:/Users/andrew/.m2/repository/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- file:/Users/andrew/.m2/repository/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
- file:/Users/andrew/repos/rp/RP-Diet/node_modules/react-native/android/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- file:/Users/andrew/repos/rp/RP-Diet/node_modules/react-native/android/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
- file:/Users/andrew/repos/rp/RP-Diet/node_modules/jsc-android/dist/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- file:/Users/andrew/repos/rp/RP-Diet/node_modules/jsc-android/dist/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
- https://dl.google.com/dl/android/maven2/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- https://dl.google.com/dl/android/maven2/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
- https://jcenter.bintray.com/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- https://jcenter.bintray.com/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
- https://jitpack.io/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- https://jitpack.io/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
Required by:
project :app > project :react-native-fbsdk
> Could not find com.facebook.android:facebook-core:5.11.1.
Searched in the following locations:- file:/Users/andrew/.m2/repository/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- file:/Users/andrew/.m2/repository/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
- file:/Users/andrew/repos/rp/RP-Diet/node_modules/react-native/android/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- file:/Users/andrew/repos/rp/RP-Diet/node_modules/react-native/android/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
- file:/Users/andrew/repos/rp/RP-Diet/node_modules/jsc-android/dist/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- file:/Users/andrew/repos/rp/RP-Diet/node_modules/jsc-android/dist/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
- https://dl.google.com/dl/android/maven2/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- https://dl.google.com/dl/android/maven2/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
- https://jcenter.bintray.com/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- https://jcenter.bintray.com/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
- https://jitpack.io/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.pom
- https://jitpack.io/com/facebook/android/facebook-core/5.11.1/facebook-core-5.11.1.jar
Required by:
project :app > project :react-native-fbsdk > com.facebook.android:facebook-login:5.11.1
project :app > project :react-native-fbsdk > com.facebook.android:facebook-share:5.11.1
project :app > project :react-native-fbsdk > com.facebook.android:facebook-login:5.11.1 > com.facebook.android:facebook-common:5.11.1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
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.
```
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)
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.