Fiebasse UI安装错误

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (1)
  • 关注 (0)
  • 查看 (9)

我想使用firebase ui recyclerview。

我当前的应用程序(build.gradle)如下:

    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.google.firebase:firebase-database:11.8.0'
    implementation 'com.google.firebase:firebase-storage:11.8.0'

我的应用程序可以正常使用此设置,但是当我包含firebase用户界面时,就像关注代码段我的应用程序崩溃并显示错误消息:“at com.google.firebase.storage.FirebaseStorage.getInstance(Unknown Source)”

    dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.google.firebase:firebase-database:11.8.0'
    implementation 'com.google.firebase:firebase-storage:11.8.0'

    implementation 'com.firebaseui:firebase-ui-database:3.2.1'

    testImplementation 'junit:junit:4.12'
    implementation 'com.squareup.picasso:picasso:2.71828'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

谢谢,

提问于
用户回答回答于

您需要匹配 firebase版本和firebase-ui版本。使用这些:

 implementation 'com.firebaseui:firebase-ui-database:4.0.1'
 implementation 'com.google.firebase:firebase-database:16.0.1'
 implementation 'com.google.firebase:firebase-storage:16.0.1'

扫码关注云+社区

领取腾讯云代金券