gpt4 book ai didi

android - FirebaseUI导入:各种其他库都在请求库com.google.android.gms:play-services-basement

转载 作者:行者123 更新时间:2023-12-03 04:57:58 25 4
gpt4 key购买 nike

我想要添加FirebaseUI依赖项,以便能够使用Google帐户,电子邮件/密码身份验证等对我的用户进行身份验证。

因此,我添加了依赖项,如文档(https://firebase.google.com/docs/auth/android/firebaseui)中所述。

但是,出现以下错误。

The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.



依赖项是:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-firestore:17.1.5'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
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.github.mancj:MaterialSearchBar:0.7.6'

annotationProcessor 'com.google.auto.value:auto-value:1.5.2'
}

问题:如何解决此错误?

最佳答案

要解决此问题,请更改以下代码行:

implementation 'com.firebaseui:firebase-ui-auth:4.1.0'


implementation 'com.firebaseui:firebase-ui-auth:4.3.0'

I would want to add FirebaseUI dependecy in order to be able to authenticate my users using Google account



如果您想使用Google对用户进行身份验证,还应该在代码行中添加以下代码行:
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'

还请确保在 build.gradle(项目)文件中包含Gradle和Google Services的以下版本:
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'

关于android - FirebaseUI导入:各种其他库都在请求库com.google.android.gms:play-services-basement,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54137284/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com