Build with react-native-fbsdk 1.1.2 fails with
ERROR: Failed to resolve: androidsdk.modules:shield:unspecified
Affected Modules: react-native-fbsdk
Build was fine, I made no changes, then I did a ./gradlew clean, reinstalled node_modules, and tried to rebuild the project. Perhaps a bad artifact got pushed for a dependency somewhere causing this sudden build failure?
Build project with react-native-fbsdk 1.1.2
Build completes
System:
OS: macOS 10.15.1
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 17.83 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.10.0 - ~/.nvm/versions/node/v12.10.0/bin/node
Yarn: 1.19.2 - ~/.yarn/bin/yarn
npm: 6.10.3 - ~/.nvm/versions/node/v12.10.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
@react-native-community/cli: ^3.0.4 => 3.0.4
react: 16.9.0 => 16.9.0
react-native: ^0.61.5 => 0.61.5
the same in 1.0.0, 1.0.1, 1.0.2, 1.0.3 .....
https://github.com/facebook/facebook-android-sdk/issues/673
Same on the main Android SDK appaently
As @lucidtheory mentionned it's a bug with [email protected]. You can go around this by fixing its version in your android/build.gradle file. At the same place as all the other variables in the begining, you can put:
facebookSdkVersion = "5.15.1"
Tried @dawee solution but still not working
Make sure the spelling is exactly facebookSdkVersion capitalization matching as well
I tried @dawee's solution too, but it's not working either in my android/build.gradle file.
buildscript {
ext {
... other dependencies
facebookSdkVersion = "5.15.1"
}
Is this the correct place to add it in?
thanks
i solved my issue by forcing the version in my app/build.gradle.
I changed:
implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
to
implementation 'com.facebook.android:facebook-android-sdk:[5,5.11.1)'
as a temporary workaround, if it helps anyone else.
solved this issue by editing the node_modules/react-native-fbsdk/android/build.gradle
from:
def FACEBOOK_SDK_VERSION = safeExtGet('facebookSdkVersion', '[5.0,6.0[')
to
def FACEBOOK_SDK_VERSION = safeExtGet('facebookSdkVersion', '[5,5.11.1)')
We can close the issue, the version with the fix is published here
https://mvnrepository.com/artifact/com.facebook.android/facebook-core/5.15.3
Issue closed
https://github.com/facebook/facebook-android-sdk/issues/673
Most helpful comment
As @lucidtheory mentionned it's a bug with [email protected]. You can go around this by fixing its version in your
android/build.gradlefile. At the same place as all the other variables in the begining, you can put:facebookSdkVersion = "5.15.1"