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
Release: 2024-11-16 13:42:02
Original
211 people have browsed it

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"
            }
        }
    }
    Copy after login
  • 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'
    Copy after login
  • 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'
    Copy after login
  • 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!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template