gpt4 book ai didi

android - 无法解析 : firebase-common

转载 作者:太空宇宙 更新时间:2023-11-03 13:41:34 28 4
gpt4 key购买 nike

我在尝试添加 firebase 身份验证时遇到此错误

Failed to resolve: firebase-common

构建.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
...
}

dependencies {
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-crash:15.0.2'
implementation 'com.google.firebase:firebase-appindexing:15.0.1'
implementation 'com.google.firebase:firebase-invites:15.0.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.google.firebase:firebase-firestore:16.0.0'
implementation 'com.firebaseui:firebase-ui-auth:4.0.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:support-vector-drawable:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.google.code.gson:gson:2.8.2'
testImplementation 'junit:junit:4.12'
}
// Add to the bottom of the file - this is for Google Firebase
apply plugin: 'com.google.gms.google-services'

在我添加实现 'com.firebaseui:firebase-ui-auth:4.0.0' 之前一切似乎都正常

感谢您的帮助!

最佳答案

如果您使用的是 firebaseui 4.0.0 版,则它还需要与 firebase 库版本兼容。

4.0.0版本,FirebaseUI有以下依赖版本:

     Library        Version
firebase-auth 16.0.1
play-services-auth 15.0.1
firebase-database 16.0.1
firebase-firestore 17.0.1
firebase-storage 16.0.1

更多信息在这里:

https://github.com/firebase/FirebaseUI-Android#compatibility-with-firebase--google-play-services-libraries

同时升级:

implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-crash:15.0.2'
implementation 'com.google.firebase:firebase-appindexing:15.0.1'
implementation 'com.google.firebase:firebase-invites:15.0.1'

以下内容:

implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.google.firebase:firebase-appindexing:16.0.1'
implementation 'com.google.firebase:firebase-invites:16.0.1'

检查这个:

https://firebase.google.com/support/release-notes/android

关于android - 无法解析 : firebase-common,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51003691/

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