Failed to resolve com.google.android.gms play-services-auth:11.4.0

后端 未结 13 1470
误落风尘
误落风尘 2020-11-22 14:08

I am trying to write code for Android FirebaseUI — Auth in my android project but from last two days, I am getting errors in my current code and don\'t know how to fix it. t

相关标签:
13条回答
  • 2020-11-22 15:13

    Failed to resolve com.google.android.gms play-services-auth:11.4.0 .

    Add maven { url "https://maven.google.com" } to your root level build.gradle file

    allprojects {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
        }
    }
    

    This maven repo is required starting from 11.2.0.

    You can also use the google() shortcut but check the requirements before using it.

    Also pay attention since you are using different version. Use the same version.

    compile 'com.google.firebase:firebase-database:11.0.4'
    compile 'com.google.firebase:firebase-auth:11.0.4'
    compile 'com.google.android.gms:play-services-auth:11.4.0'
    

    UPDATE

    Firebase Android SDKs and Google Play Services libraries now have independent version numbers, allowing for more frequent, flexible updates. Update the google play service gradle plugin version to latest version (at least 3.3.1).

    classpath 'com.google.gms:google-services:4.0.1'
    

    and update the libraries to the latest version.

    0 讨论(0)
提交回复
热议问题