我试图将Firebase的实时数据库添加到我的应用程序,一切运行顺利,构建成功,但是我创建的数据库没有添加。这是我的代码:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "--"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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.theartofdev.edmodo:android-image-cropper:2.7.+'
implementation 'info.hoang8f:fbutton:1.0.5'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.android.support:cardview-v7:27.0.0'
implementation 'com.android.support:recyclerview-v7:27.0.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.firebaseui:firebase-ui-database:1.2.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:support-v4:27.0.0'
implementation('com.github.bumptech.glide:glide:4.7.1') {
exclude group: "com.android.support"
}
implementation 'com.android.support:support-fragment:27.0.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation('com.github.bumptech.glide:glide:4.7.1@aar') {
transitive = true
}
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.github.bumptech.glide:glide:4.7.1'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.google.firebase:firebase-storage:15.0.0'
}
apply plugin: 'com.google.gms.google-services'
所有运行都成功,已经同步并连接到Firebase,但是数据没有累加。
有帮助吗? 谢谢