Home > Java > javaTutorial > How to Resolve the \'Failed to resolve com.google.android.gms play-services-auth\' Dependency Issue?

How to Resolve the \'Failed to resolve com.google.android.gms play-services-auth\' Dependency Issue?

Patricia Arquette
Release: 2024-11-17 03:03:03
Original
592 people have browsed it

How to Resolve the

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

Unable to resolve the dependency com.google.android.gms play-services-auth:11.4.0? This issue can usually be attributed to the absence of the maven repository in your root level build.gradle file.

Solution:

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

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

Starting with version 11.2.0, this maven repo is essential.

Alternatively, you can use the google() shortcut, but ensure you meet its requirements.

Version Consistency:

It's crucial to maintain version consistency. In your case, you are using different versions of the Firebase libraries. For compatibility, ensure you 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'
Copy after login

Update Notes:

Firebase Android SDKs and Google Play Services libraries now have independent version numbers, allowing for more frequent updates. To keep up, consider updating the following:

  • Google Play Service gradle plugin to the latest version (at least 3.3.1):
classpath 'com.google.gms:google-services:4.0.1'
Copy after login
  • Update Firebase libraries to their latest versions.

The above is the detailed content of How to Resolve the \'Failed to resolve com.google.android.gms play-services-auth\' Dependency Issue?. 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