与 Firebase 安装服务器 API 通信时出现 Android 错误
我在应用程序启动时收到一条错误消息,指出日志,例如
W/Firebase-Installations: Error when communicating with the Firebase Installations server API. HTTP response: [400 Bad Request: {
"error": {
"code": 400,
"message": "API key not valid. Please pass a valid API key.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console",
"url": "https://console.developers.google.com"
}
]
}
]
}
}
]
2020-04-27 12:42:34.621 22226-23596/in.co.androidapp.g7 E/Firebase-Installations: Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.
大约一周前,我收到一封电子邮件,说我应该更新我的google_services.json文件,我已经做了4-5次。无改进。它已经运行了大约一年。自从我在应用程序中遇到此问题以来,它只有2-3天。
随后,Firebase Cloud Messaging 和其他 firebase 服务无法正常工作。我没有进行编程初始化(即使用FirebaseOptions对象来提供这些值),只是默认初始化使用FirebaseApp.initializeApp(this);
提前致谢。