Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle cannot resolve the most recent Firebase libraries , i.e, versions of 9.4.0

I am trying to upgrade my Firebase libraries to the new 9.4.0 version; however, I get the "can't resolve" error in Gradle upon syncing. Here's the error:

Error:(38, 13) Failed to resolve: com.google.firebase:firebase-core:9.4.0
Error:(40, 13) Failed to resolve: com.google.firebase:firebase-auth:9.4.0
Error:(40, 13) Failed to resolve: com.google.firebase:firebase-storage:9.4.0

Tried with and without firebase-core, no difference.

Here's my Gradle for both app and project level: project level:

  buildscript {
repositories {
    jcenter()
    mavenLocal()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.1.2'
    classpath 'com.google.gms:google-services:3.0.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
 }

 allprojects {
repositories {
    jcenter()
    mavenLocal()
}
}

 task clean(type: Delete) {
delete rootProject.buildDir
}

and for the module:app level: apply plugin: 'com.android.application'

    android {
compileSdkVersion 24
buildToolsVersion "24.0.0"

defaultConfig {
    applicationId "com.example.main.projectone"
    minSdkVersion 18
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),     'proguard-rules.pro'
    }
}
 }

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'

//  compile 'com.google.android.gms:play-services-gcm:9.2.0'
//  compile 'com.google.android.gms:play-services:9.2.1'

compile('com.facebook.android:facebook-android-sdk:4.7.0') {
    exclude module: 'bolts-android'
}

//  compile 'com.fasterxml.jackson.core:jackson-core:2.8.1'
// compile 'com.fasterxml.jackson.core:jackson-databind:2.8.1'


compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.firebase:firebase-auth:9.4.0'
compile 'com.google.firebase:firebase-storage:9.4.0'
compile 'com.android.support:design:24.0.0'
compile 'com.parse:parse-android:1.13.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
compile 'com.squareup.okhttp3:okhttp:3.3.1'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:support-v4:24.0.0'
compile 'com.google.android.gms:play-services:9.2.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
}

 apply plugin: 'com.google.gms.google-services'

Any idea why Gradle cannot resolve the libraries? Here's Firebase website addressing them Firebase Newest Libs. Appreciate your help.

like image 564
TheeBen Avatar asked Aug 08 '16 23:08

TheeBen


1 Answers

Update the SDK Tools in Android Studio. After upgrading Google Play Services and Google Repository to the latest versions, I was able to resolve the same issue faced with latest version 9.4.0 of Firebase libraries Android Studio SDK Tools

like image 112
tony m Avatar answered Oct 01 '22 06:10

tony m