【发布时间】:2017-03-05 09:23:17
【问题描述】:
我对 Firebase 有一个大问题。我很久以前在我的应用服务 Realtime Firebase 数据库中实现了。一切正常。然而,几个星期以来,我遇到了一些问题。当应用程序处于后台并停留一段时间时,Firebase 会脱机并且实时数据库服务无法正常工作。我在网上查了一下,发现这个东西有很多问题,但是我没有找到适合我的解决方案。我也收到以下错误:
W/PersistentConnection: pc_0 - Provided authentication credentials are invalid. This usually indicates your FirebaseApp instance was not initialized correctly. Make sure your google-services.json file has the correct firebase_url and api_key. You can re-download google-services.json from https://console.firebase.google.com/.
当然,我尝试重新下载 json 文件,并检查了所有密钥。是数据库中的一个错误
这使我的应用程序无法使用。我尝试按照此https://itayhauptman.wordpress.com/2016/10/06/firebase-firebase-warning-provided-authentication-credentials-are-invalid-this-usually-indicates-your-firebaseapp-instance-was-not-initialized-correctly/ 指南创建服务帐户,
我尝试了这个Firebase for Android - W/PersistentConnection: pc_0 - Provided authentication credentials are invalid 问题中建议的solzuione,我尝试简化我的错误代码。所有这些行动都不能解决问题。我要做的最后一件事是在 Firebase 控制台中创建一个新应用程序。
在你这样做之前,有没有人有任何解决方案? 我真的很渴望这件事。 谢谢
【问题讨论】:
标签: android firebase firebase-realtime-database