The library com.google.android.gms:play-services-base is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1

吃可爱长大的小学妹 提交于 2019-11-28 12:36:45

Option 1

Downgrade your google service version to 3.2.1

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

Option 2

right after the apply plugin: 'com.google.gms.google-services' at the bottom of your build.gradle the following can be added to work around the issue.

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

Using the latest version of the library works com.google.firebase:firebase-core:16.0.9

find the latest version frm maven: https://dl.google.com/dl/android/maven2/index.html

most likely ...without knowing what might be in the libs directory:

dependencies {
    implementation "com.google.android.gms:play-services-base:16.0.1"
    implementation (fileTree(dir: "libs", include: ["*.jar"])) {
        exclude group: "com.google.android.gms"
    }
}

or enforce the version to select:

configurations.all() {
    resolutionStrategy.force "com.google.android.gms:play-services-base:16.0.1"
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!