Home >Java >javaTutorial >How to Fix \'Failed to resolve com.google.android.gms:play-services-auth:11.4.0\' Error in Android FirebaseUI Auth?

How to Fix \'Failed to resolve com.google.android.gms:play-services-auth:11.4.0\' Error in Android FirebaseUI Auth?

Linda Hamilton
Linda HamiltonOriginal
2024-11-16 13:42:02231browse

How to Fix

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

Issue:

When attempting to utilize FirebaseUI for Android Auth, developers may encounter the error message "Failed to resolve com.google.android.gms:play-services-auth:11.4.0". This error occurs due to challenges in resolving the dependency.

Resolution:

To resolve this issue, the following steps should be taken:

  • Add maven Repository:

    Append the following block to the root level build.gradle file:

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

    Verify that the version numbers of the Firebase and Google Play Services libraries are consistent. For example:

    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'
  • Upgrade Gradle Plugin (Optional):

    Update the Google Play Services Gradle plugin to the latest version (minimum version: 3.3.1):

    classpath 'com.google.gms:google-services:4.0.1'
  • Update Library Versions:

    Upgrade the Firebase and Google Play Services libraries to the most recent versions available.

The above is the detailed content of How to Fix \'Failed to resolve com.google.android.gms:play-services-auth:11.4.0\' Error in Android FirebaseUI Auth?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn