我只是想在數據庫中寫一條消息,然后在運行應用程序時出現此錯誤據我所知,我已經在我的 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'
希望它會對某人有所幫助。
- 1 回答
- 0 關注
- 81 瀏覽
添加回答
舉報
0/150
提交
取消