magus / react-native-facebook-login

React Native component wrapping the native Facebook SDK login button and manager
MIT License
1.24k stars 327 forks source link

Error react-native-facebook-login configuring #328

Open longnk-1447 opened 5 years ago

longnk-1447 commented 5 years ago

Help me!!! I'm used react-native-facebook-login, everything is working perfectly today. i run react-native run-android and this

Configure project :react-native-config WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

FAILURE: Build failed with an exception.

What went wrong: A problem occurred configuring project ':react-native-facebook-login'. Could not resolve all files for configuration ':react-native-facebook-login:classpath'. Could not find any matches for com.android.tools.build:gradle:1.2.+ as no versions of com.android.tools.build:gradle are available. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml https://jcenter.bintray.com/com/android/tools/build/gradle/ Required by: project :react-native-facebook-login

I don't know why, Please give me a solution to fix it

Thank you very much!

msiripan commented 5 years ago

For anyone who stumble to this issue please go to this link: https://github.com/react-native-community/react-native-image-picker/issues/1002 and https://stackoverflow.com/questions/53691457/react-native-android-could-not-find-com-android-toolscommon

longnk-1447 commented 5 years ago

msiripan thank you very much!!

gou3105 commented 5 years ago

Same here!

longnk-1447 commented 5 years ago

gou3105

subprojects {
    if (project.name.contains('react-native-facebook-login')) {
        buildscript {
            repositories {
                jcenter()
                maven { url "https://dl.bintray.com/android/android-tools/"  }
            }
        }
    }
gou3105 commented 5 years ago

@longnk1301 Thank You! 👍

vvusts commented 5 years ago

In my case only this works: In my project gradle:

subprojects {
    afterEvaluate {project ->

        if (project.name.contains('react-native-facebook-login') || 
            project.name.contains('react-native-vector-icons')) {
            buildscript {
                repositories {
                    jcenter()
                    maven { url "https://dl.bintray.com/android/android-tools/"  }
                }
            }
        }

In each of those libraries gradle:

dependencies {
    classpath 'com.android.tools.build:gradle:2.3.0'
  }
longnk-1447 commented 5 years ago

I need why??

saadrehman013 commented 5 years ago

For anyone who stumble to this issue please go to this link: react-native-community/react-native-image-picker#1002 and https://stackoverflow.com/questions/53691457/react-native-android-could-not-find-com-android-toolscommon

Thanks... Appreciated! (Y)