Home > Java > javaTutorial > How to Resolve \'Failed to Resolve com.google.android.gms Play-Services-Auth:11.4.0\' Error in Android FirebaseUI?

How to Resolve \'Failed to Resolve com.google.android.gms Play-Services-Auth:11.4.0\' Error in Android FirebaseUI?

Susan Sarandon
Release: 2024-11-15 13:40:02
Original
451 people have browsed it

How to Resolve

Resolving "Failed to Resolve Com.google.android.gms Play-Services-Auth:11.4.0" Error

Issue Description

When attempting to write code for Android FirebaseUI - Auth, users may encounter an error "Failed to resolve com.google.android.gms play-services-auth:11.4.0." This error typically arises due to discrepancies in repository configuration or version mismatches.

Solution

To resolve this issue, follow these steps:

1. Add Google Maven Repository to Root-Level build.gradle

Add the following repository to your root-level build.gradle file:

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

Starting from 11.2.0, this maven repository is required.

2. Ensure Consistent Library Versions

Verify that all Firebase and Google Play Services libraries use the same version. In this case, you should use the following versions:

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

3. Update Google Play Services Plugin

Upgrade the Google Play Services plugin in your build.gradle file to the latest version (at least 3.3.1):

classpath 'com.google.gms:google-services:4.0.1'
Copy after login

4. Update Libraries to Latest Versions

Update all Firebase and Google Play Services libraries to their latest versions as well.

Note: As of May 2023, Firebase Android SDKs and Google Play Services libraries have independent version numbers.

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

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