android– 在项目’app’中,已解决的Google Play服务库依赖关系依赖于另一个确切版本

android– 在项目’app’中,已解决的Google Play服务库依赖关系依赖于另一个确切版本,第1张

概述尝试使用FireStore和Google身份验证创建一个简单的应用程序.有问题的gradle:Inproject‘app’aresolvedGooglePlayserviceslibrarydependencydependsonanotheratanexactversion(e.g.“[15.0.1]”,butisn’tbeingresolvedtothatversion.Behavior

尝试使用FireStore和Google身份验证创建一个简单的应用程序.有问题的gradle:

In project ‘app’ a resolved Google Play services library dependency
depends on another at an exact version (e.g. “[15.0. 1]”, but isn’t
being resolved to that version. Behavior exhibited by the library will
be unkNown.

Dependency failing: com.Google.android.gms:play-services-flags:15.0.1
-> com.Google.androID.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.0.1.

The following dependencIEs are project dependencIEs that are direct or
have transitive dependencIEs that lead to the art ifact with the
issue.
— Project ‘app’ depends onto com.Google.firebase:[email protected]
— Project ‘app’ depends onto com.firebaseui:[email protected]

For extended deBUGging info execute Gradle from the command line with
./gradlew –info :app:assembleDeBUG to see the dep endency paths to
the artifact. This error message came from the Google-services Gradle
plugin, report issues at https://
github.com/Google/play-services-plugins and disable by adding
“GoogleServices { disabLeversionCheck = false }” to your b uild.gradle
file.

    apply plugin: 'com.androID.application'    androID {        compileSdkVersion 27        defaultConfig {            applicationID "myapp.com"            minSdkVersion 19            targetSdkVersion 27            versionCode 11            versionname "1.1"            testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner"            multIDexEnabled true        }        buildTypes {            release {                MinifyEnabled false                proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.pro'            }        }    }    dependencIEs {        implementation filetree(dir: 'libs', include: ['*.jar'])        implementation 'com.androID.support:appcompat-v7:27.1.1'        implementation 'com.androID.support.constraint:constraint-layout:1.1.3'        testImplementation 'junit:junit:4.12'        androIDTestImplementation 'com.androID.support.test:runner:1.0.2'        androIDTestImplementation 'com.androID.support.test.espresso:espresso-core:3.0.2'        implementation 'com.Google.firebase:firebase-firestore:17.1.5'        implementation 'com.firebaseui:firebase-ui-auth:4.2.0'    }    apply plugin: 'com.Google.gms.Google-services'    com.Google.gms.Googleservices.GoogleServicesPlugin

项目gradle:

buildscript {    repositorIEs {        Google()        jcenter()    }    dependencIEs {        classpath 'com.androID.tools.build:gradle:3.2.1'        classpath 'com.Google.gms:Google-services:4.2.0'    }}

有人能帮助我吗?

解决方法:

问题是缺少依赖性.
添加com.Google.firebase:firebase-auth解决了这个问题.

dependencIEs {    implementation filetree(dir: 'libs', include: ['*.jar'])    implementation 'com.androID.support:appcompat-v7:27.1.1'    implementation 'com.androID.support.constraint:constraint-layout:1.1.3'    testImplementation 'junit:junit:4.12'    androIDTestImplementation 'com.androID.support.test:runner:1.0.2'    androIDTestImplementation 'com.androID.support.test.espresso:espresso-core:3.0.2'    implementation 'com.Google.firebase:firebase-firestore:17.1.5'//    implementation'com.Google.firebase:firebase-core:16.0.6'//    implementation'com.Google.firebase:firebase-storage:16.0.5'    implementation'com.Google.firebase:firebase-auth:16.1.0' => add this line    implementation 'com.firebaseui:firebase-ui-auth:4.2.0'}
总结

以上是内存溢出为你收集整理的android – 在项目’app’中,已解决的Google Play服务库依赖关系依赖于另一个确切版本全部内容,希望文章能够帮你解决android – 在项目’app’中,已解决的Google Play服务库依赖关系依赖于另一个确切版本所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1112545.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存