为了账号安全,请及时绑定邮箱和手机立即绑定

为什么当我尝试在 Firebase 数据库中写入时出现此错误?

为什么当我尝试在 Firebase 数据库中写入时出现此错误?

MMMHUHU 2022-12-28 16:36:39
我只是想在数据库中写一条消息,然后在运行应用程序时出现此错误据我所知,我已经在我的 gradle 中添加了必要的依赖项gradle 在模块级别,我已经添加了 Firebase Core、Firebase 数据库等:dependencies {    implementation fileTree(include: ['*.jar'], dir: 'libs')    implementation 'com.android.support:appcompat-v7:28.0.0-rc02'    implementation 'com.android.support:design:28.0.0-rc02'    implementation 'com.android.support.constraint:constraint-layout:1.1.3'    implementation 'com.android.support:support-vector-drawable:28.0.0-rc02'    implementation 'com.android.support:support-v4:28.0.0-rc02'    implementation 'com.firebaseui:firebase-ui-auth:5.0.0'    implementation 'com.google.firebase:firebase-database:16.0.1'    implementation 'com.google.firebase:firebase-auth:16.2.1'    implementation 'com.google.android.gms:play-services-maps:16.1.0'    implementation 'com.google.firebase:firebase-core:16.0.8'    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.squareup.picasso:picasso:2.71828'    implementation 'de.hdodenhof:circleimageview:3.0.0'    implementation 'com.github.bumptech.glide:glide:4.9.0'    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'    implementation 'com.facebook.android:facebook-android-sdk:[4,5)'    implementation 'com.facebook.android:facebook-android-sdk:4.42.0'    implementation 'com.android.support:multidex:1.0.3'}apply plugin: 'com.google.gms.google-services'项目级别的gradlebuildscript {    repositories {        google()        jcenter()        mavenCentral()    }    dependencies {        classpath 'com.android.tools.build:gradle:3.3.0'        classpath 'com.google.gms:google-services:4.2.0'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}allprojects {    repositories {        google()        jcenter()    }}
查看完整描述

1 回答

?
慕的地6264312

TA贡献1817条经验 获得超6个赞

我的问题只是将 firebase 数据库版本升级到 17 就解决了:

implementation 'com.google.firebase:firebase-database:17.0.0'

希望它会对某人有所帮助。


查看完整回答
反对 回复 2022-12-28
  • 1 回答
  • 0 关注
  • 76 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号