我的应用程序运行良好,可以从Firebase获取数据。但有时特别是在等待很长时间后,如果我再次打开我的应用程序,它将无法从firebase读取数据,并且还会在Logcat发出此警告。直到我唱歌和唱歌都没有用。
W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms
我的gradle上是否有任何遗漏的行?
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.restroomgames.whereismydudy.where"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.android.gms:play-services-maps:11.6.2'
implementation 'com.google.firebase:firebase-auth:11.6.2'
implementation 'com.google.firebase:firebase-database:11.6.2'
implementation 'com.google.firebase:firebase-messaging:11.6.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.android.gms:play-services-location:11.6.2'
implementation 'com.android.support:design:26.1.0'
implementation 'com.lapism:searchview:5.0.0-alpha7'
implementation 'agency.tango.android:material-intro-screen:0.0.5'
implementation 'com.firebase:geofire-android:2.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
}
apply plugin: 'com.google.gms.google-services'
最佳答案
该代码似乎还可以。
这只是在我身上发生了类似,相同的警告,电子邮件/密码验证问题。
这是因为升级计算机操作系统后,我忘记更新项目中的SHA-1指纹了。
也许项目中的API密钥或SHA-1指纹有问题?