【发布时间】:2019-01-19 00:52:39
【问题描述】:
我将所有设置更改为我自己的设置。 firebase 设置是我自己的。
"firebase_url": "https://xxxxxxxxx.firebaseio.com",
我在 android studio 中重建应用程序,即 build apk。 将它上传到我的手机,当我尝试它时,它仍然在应用程序中有旧的 Firebase。 我现在不知道该怎么办,希望有人能帮助我。
更新:
它可以是包名中的东西吗? 这是我的名字。
root/app/build.gradle
applicationId: com.xxxxxxx.user.app
root/app/src/main/AndroidManifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxxxxxx.app">
Root/app/google-services.json
{
"project_info": {
"project_number": "xxxxxxxxxxxxxxxxxxx",
"firebase_url": "https://xxxxxxx-user.firebaseio.com",
"project_id": "xxxxxxx-user",
"storage_bucket": "xxxxxxx-user.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
"android_client_info": {
"package_name": "com.xxxxxx.user.app"
}
},
Firebase 控制台:
Project name : xxxxxxx-user
Project ID : xxxxxxx-user
root/app/src/main/java/com/xxxxxxx/user/app/Helper
package com.xxxxxxx.user.app.Helper;
【问题讨论】:
-
您拥有的应用程序将根据您放置在根目录 (Root/app/google-services.json) 中的文件连接到 FireBase,而不管您计算机上的应用程序名称及其在 FireBase 上的名称。因此,请务必替换将应用程序链接到正确 Firebas 项目的文件。
-
但这就是问题所在。它没有连接。我不能在firebase中添加任何东西。 .它连接到不在 google-services 中的另一个 firebase .. 我在项目中找不到链接..
标签: android firebase android-studio firebase-realtime-database