【发布时间】:2018-06-05 08:18:07
【问题描述】:
我不确定这里发生了什么,我提取了我最近更新的存储库,每次打开应用程序在模拟器上调试它时,当应用程序加载主屏幕时,我都会收到 E/FirebaseInstanceId: Token retrieval failed: AUTHENTICATION_FAILED。但是,这在今天之前没有发生过,所以我不知道有什么可以改变的?我从 Firebase 控制台中删除了该应用程序并重新添加了它(通过 Firebase 助手),但这也没有解决它?我已经包含了我的 build.grade 文件,但我不确定我还需要查看什么,我们将不胜感激。
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.android.projectrc"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.wdullaer:materialdatetimepicker:3.4.0'
implementation "org.jetbrains.anko:anko:$anko_version"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.github.bumptech.glide:glide:4.2.0'
implementation 'com.google.firebase:firebase-auth:11.0.4'
implementation 'com.google.firebase:firebase-database:11.0.4'
implementation 'com.google.firebase:firebase-storage:11.0.4'
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'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】:
-
您对用户进行了身份验证吗?
-
是的!我一直在使用几个月前创建的测试帐户-没有意义的是为什么会在用户登录之前发生这种情况-我注意到有时模拟器的互联网连接参差不齐(这更没有意义因为我是通过桌面上的 LAN 连接的)所以我想知道这是否是问题所在。