首页 > 解决方案 > 更改了我的包裹名称,更新了 googleservices.json 文件,计费和付款停止工作

问题描述

请宽容,我是这里的新手。所以这是我的 google-services.json 文件,所以一旦我将包名称和 google-services.json 更改为“com.oldapp.app”,计费工作正常,但只要我将其更改为“com.NewApp.应用程序”包名称并更新为新的 google-services.json 它停止工作,有人可以帮我解决这个问题吗?提前致谢!

    {
  "project_info": {
    "project_number": "12144",
    "firebase_url": "https://oldapp-123.firebaseio.com",
    "project_id": "oldapp-123",
    "storage_bucket": "oldapp-123.appspot.com"
  },
  "client": [
    {
      "client_info": {
        "mobilesdk_app_id": "123",
        "android_client_info": {
          "package_name": "com.oldapp.app"
        }
      },
      "oauth_client": [
        {
          "client_id": "123.apps.googleusercontent.com",
          "client_type": 1,
          "android_info": {
            "package_name": "com.oldapp.app",
            "certificate_hash": "d123"
          }
        }
      ],
      "api_key": [
        {
          "current_key": "awdqwd"
        }
      ],
      "services": {
        "appinvite_service": {
          "other_platform_oauth_client": [
            {
              "client_id": "1234s.apps.googleusercontent.com",
              "client_type": 3
            },
            {
              "client_id": "9123h.apps.googleusercontent.com",
              "client_type": 2,
              "ios_info": {
                "bundle_id": "com.oldapp.app"
              }
            }
          ]
        }
      }
    },
    {
      "client_info": {
        "mobilesdk_app_id": "1237:android:123",
        "android_client_info": {
          "package_name": "com.oldapp.app.dev"
        }
      },
      "oauth_client": [],
      "api_key": [
        {
          "current_key": "sadad"
        }
      ],
      "services": {
        "appinvite_service": {
          "other_platform_oauth_client": [
            {
              "client_id": "9132as.apps.googleusercontent.com",
              "client_type": 3
            },
            {
              "client_id": "1412ded.apps.googleusercontent.com",
              "client_type": 2,
              "ios_info": {
                "bundle_id": "com.oldapp.app"
              }
            }
          ]
        }
      }
    },
    {
      "client_info": {
        "mobilesdk_app_id": "112123:android:csees",
        "android_client_info": {
          "package_name": "com.oldapp02.app"
        }
      },
      "oauth_client": [],
      "api_key": [
        {
          "current_key": "asdasd"
        }
      ],
      "services": {
        "appinvite_service": {
          "other_platform_oauth_client": [
            {
              "client_id": "adwad4s.apps.googleusercontent.com",
              "client_type": 3
            },
            {
              "client_id": "adawawd.apps.googleusercontent.com",
              "client_type": 2,
              "ios_info": {
                "bundle_id": "com.oldapp.app"
              }
            }
          ]
        }
      }
    },
    {
      "client_info": {
        "mobilesdk_app_id": "1:234234:android:c1qadad416ee6",
        "android_client_info": {
          "package_name": "com.NewApp.app"
        }
      },
      "oauth_client": [
        {
          "client_id": "asdadagj.apps.googleusercontent.com",
          "client_type": 1,
          "android_info": {
            "package_name": "com.NewApp.app",
            "certificate_hash": "asadasd"
          }
        },
        {
          "client_id": "asadadsf.apps.googleusercontent.com",
          "client_type": 1,
          "android_info": {
            "package_name": "com.NewApp.app",
            "certificate_hash": "sdfsfsf"
          }
        },
        {
          "client_id": "24234243.apps.googleusercontent.com",
          "client_type": 1,
          "android_info": {
            "package_name": "com.NewApp.app",
            "certificate_hash": "afadsd"
          }
        }
      ],
      "api_key": [
        {
          "current_key": "zdfzs"
        }
      ],
      "services": {
        "appinvite_service": {
          "other_platform_oauth_client": [
            {
              "client_id": "sfsfefsv7qi4s.apps.googleusercontent.com",
              "client_type": 3
            },
            {
              "client_id": "asadasdnth.apps.googleusercontent.com",
              "client_type": 2,
              "ios_info": {
                "bundle_id": "com.oldapp.app"
              }
            }
          ]
        }
      }
    }
  ],
  "configuration_version": "1"
}






and this is the old google-services.json file for the old package 

   ``` {
  "project_info": {
    "project_number": "1231244",
    "firebase_url": "https://oldapp-34d.firebaseio.com",
    "project_id": "oldapp-74d",
    "storage_bucket": "oldapp-3d.appspot.com"
  },
  "client": [
    {
      "client_info": {
        "mobilesdk_app_id": "12414141275",
        "android_client_info": {
          "package_name": "com.oldapp.app"
        }
      },
      "oauth_client": [
        {
          "client_id": "124124124214m.apps.googleusercontent.com",
          "client_type": 1,
          "android_info": {
            "package_name": "com.oldapp.app",
            "certificate_hash": "fadadad"
          }
        }
      ],
      "api_key": [
        {
          "current_key": "sfasdadas"
        }
      ],
      "services": {
        "appinvite_service": {
          "other_platform_oauth_client": [
            {
              "client_id": "9sdfafa23423s.apps.googleusercontent.com",
              "client_type": 3
            },
            {
              "client_id": "92asfsfasasfsah.apps.googleusercontent.com",
              "client_type": 2,
              "ios_info": {
                "bundle_id": "com.oldapp.app"
              }
            }
          ]
        }
      }
    },
    {
      "client_info": {
        "mobilesdk_app_id": "asdasdasdf",
        "android_client_info": {
          "package_name": "com.oldapp.app.dev"
        }
      },
      "oauth_client": [],
      "api_key": [
        {
          "current_key": "asdsadads"
        }
      ],
      "services": {
        "appinvite_service": {
          "other_platform_oauth_client": [
            {
              "client_id": "sdasdsads.apps.googleusercontent.com",
              "client_type": 3
            },
            {
              "client_id": "asdadadadsh.apps.googleusercontent.com",
              "client_type": 2,
              "ios_info": {
                "bundle_id": "com.oldapp.app"
              }
            }
          ]
        }
      }
    }
  ],
  "configuration_version": "1"
} ```

标签: androidfirebasekotlingoogle-play-services

解决方案


不支持更改应用程序的包名称(应用程序 ID)而不向控制台中的 Firebase 项目添加新应用程序。在控制台中注册一个新应用程序,然后删除旧应用程序。正如链接文档所说:

确保输入您的应用实际使用的包名称。将应用注册到 Firebase 项目后,您将无法添加或修改此值。


推荐阅读