Failed to resolve: com.facebook.android:facebook-android-sdk:4.4.0

11,843

Solution 1

Finally after spending 6-8 hours on it. I got the solution for you. You have to just change repositories section in your app build.gradle file. change it from mavenCentral to jcenter as following

repositories {
    jcenter {
        url "http://jcenter.bintray.com/"
    }    
}

After having this, You can simply add the dependency as

compile 'com.facebook.android:facebook-android-sdk:4.0.0'

Solution 2

Try This,

dependencies { 
  compile 'com.facebook.android:facebook-android-sdk:4.4.1'
}

Information

buildToolsVersion "23.0.0 rc3" is not stable purely .Set minSdkVersion 15

Share:
11,843
spuemaacne
Author by

spuemaacne

Updated on June 20, 2022

Comments

  • spuemaacne
    spuemaacne almost 2 years

    Below is code from my build.gradle file.

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 22
        buildToolsVersion "23.0.0 rc3"
    
        defaultConfig {
            applicationId "com.example.test"
            minSdkVersion 14
            targetSdkVersion 22
            versionCode 1
            versionName "1.0"
        }
    
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    repositories {
       mavenCentral()
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:22.2.1'
        compile 'com.facebook.android:facebook-android-sdk:4.4.0'
    }
    

    When I do Sync project with gradle files, it gives me error.

      Error:(28, 13) Failed to resolve: com.facebook.android:facebook-android-sdk:4.4.0
    

    Can anyone tell me why I'm getting this error?

    Similar question has been asked here but no one has answered it. ( Failed to resolve: com.facebook.android:facebook-android-sdk:4.0.0 )

  • Prizoff
    Prizoff almost 9 years
    According to maven.org, 4.4.0 is the latest version available through maven repo. search.maven.org/#search%7Cga%7C1%7Cfacebook-android-sdk
  • spuemaacne
    spuemaacne almost 9 years
    I tried with compile 'com.facebook.android:facebook-android-sdk:4.4.1' too and it didn't work. I also tried build version 22.0.1 and min sdk as 15. It didn't work
  • Abdul Mohsin
    Abdul Mohsin almost 9 years
    m also stuck in the same problem. dont know what to do