本文介绍了无法解决:firebase-common的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试添加Firebase身份验证时出现此错误

I am getting this error when trying to add firebase auth

build.gradle

build.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'之前,一切似乎都可以正常工作

Everything seems to work until I add the implementation 'com.firebaseui:firebase-ui-auth:4.0.0'

感谢您的帮助!

推荐答案

如果您使用的是Firebaseui 4.0.0版,则它还必须与Firebase库版本兼容.

If you are using firebaseui version 4.0.0, then it needs to be compatible with the firebase libraries versions also.

FirebaseUI 4.0.0版具有以下依赖项版本:

The version 4.0.0, FirebaseUI has the following dependency versions:

     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

这篇关于无法解决:firebase-common的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 13:30