同步过程中出现错误:
无法解决:firebase-auth-15.0.0
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.battrip.bad_chat"
minSdkVersion 21
targetSdkVersion 28
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 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
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.google.firebase:firebase-database:16.0.1:15.0.0'
}
我如何修复错误:而不是
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'记录:
implementation 'com.google.firebase:firebase-database:16.0.1'然后我忽略了 android studio 提供给我的东西。
结果如下:
为了测试应用程序的性能,我在activity_main中创建了一个按钮,并将以下代码添加到main_activity:
编译,然后在firebase中检查一切都来了。