Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Android: ERROR: Failed to resolve: androidsdk.modules:shield:unspecified #701

Open
evelant opened this issue Feb 3, 2020 · 9 comments
Open

Comments

@evelant
Copy link

evelant commented Feb 3, 2020

🐛 Bug Report

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?

To Reproduce

Build project with react-native-fbsdk 1.1.2

Expected Behavior

Build completes

Environment

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
@ArekChr
Copy link

ArekChr commented Feb 3, 2020

the same in 1.0.0, 1.0.1, 1.0.2, 1.0.3 .....

@lucidtheory
Copy link

lucidtheory commented Feb 3, 2020

facebook/facebook-android-sdk#673

Same on the main Android SDK appaently

@dawee
Copy link

dawee commented Feb 3, 2020

As @lucidtheory mentionned it's a bug with fbsdk@5.15.2. 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"

@addingama
Copy link

Tried @dawee solution but still not working

@lucidtheory
Copy link

lucidtheory commented Feb 4, 2020

Make sure the spelling is exactly facebookSdkVersion capitalization matching as well

@danhernandez
Copy link

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

@danhernandez
Copy link

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.

@Jheysoon
Copy link

Jheysoon commented Feb 4, 2020

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)')

@krunalsshah
Copy link

krunalsshah commented Feb 5, 2020

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
facebook/facebook-android-sdk#673

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants