google-services.json-更改了package_name-我是否需要创建一个新的配置文件 [英] google-services.json - changed package_name - do i need to create a new configuration file

查看:82
本文介绍了google-services.json-更改了package_name-我是否需要创建一个新的配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前的环境已经有一个google-services.json文件,并且一切正常.但是现在由于不可预见的情况,我必须重命名我的项目的程序包.我现在已经成功重命名了该程序包.我还进入了google-services.json文件,并在那里也将包名称重命名.因此,现在我想知道是否需要回到google开发人员网站并创建一个新的配置文件?

My current environemnt already has a google-services.json file and everything works. But now due to unforeseen circumstance i must rename the package of my project. I have successfully renamed the package now. I also went into the google-services.json file and renamed the package name there as well. So now i am wondering do i need to go back onto the google developer site and create a new configuration file ?

基本上,我担心在google-services.json中重命名软件包名称是不够的.我认为配置与原始程序包名称相关.我想知道开发人员何时重命名项目的程序包名称,是否有必要从

Basically i am concerned that renaming the package namein google-services.json is not sufficient. i think that configuration is tied to the original package name. I am wondering when a developer renames the package name of a project is it necesaary to generate a new configuration file from google developer site ?

这是我最初生成的google-services.json文件,我将向您展示如何更改程序包名称:

Here is the google-services.json file i originally generated and i'll show you how i changed the package name :

 {
  "project_info": {
    "project_number": "987654321",
    "project_id": "firebase-project_myapp"
  },
  "client": [
    {
      "client_info": {
        "mobilesdk_app_id": "1:234567:android:1011212314151617",
        "android_client_info": {
          "package_name": "com.NewPackageName" //i updated package name
        }
      },
      "oauth_client": [],
      "api_key": [
        {
          "current_key": "adlskfjsd;fjkalskdjfalk;sdfj"
        }
      ],
      "services": {
        "analytics_service": {
          "status": 1
        },
        "appinvite_service": {
          "status": 1,
          "other_platform_oauth_client": []
        },
        "ads_service": {
          "status": 1
        }
      }
    }
  ],
  "configuration_version": "1"
}

再次仅更新json文件中的package_name是否足够?我是否需要为我的应用创建所有新项目?

Again is it sufficientn to to only update package_name in the json file or do i need to create all new projects for my app ?

推荐答案

在google-services.json文件中更改程序包名称将不起作用,因为它不能充当任何形式的更新机制,而只能充当数据存储库在服务实例建立期间使用.

Changing the package name in the google-services.json file will not work as it does not act as an update mechanism of any sort but merely a repository of data to be used during services instance establishment.

是的,有必要通过创建新的应用程序或通过删除控制台中的当前应用程序来创建新的配置文件,您可以重新使用最初使用的应用程序名称.这是因为每个google服务实例都是专门为特定应用程序生成的,该应用程序与具有特定标识符的程序包名称相关联.因此,绝对有必要创建一个新应用程序并使用该应用程序设置中的google-services.json文件.

Yes, it is necessary to create a new configuration file by creating a new application or by deleting the current application in the console you can re-use the application name originally used. This is because each google services instance are generated specifically for a particular application tied to the package name with specific identifiers. So it is an absolute necessity to create a new application and use the google-services.json file from that application settings.

这篇关于google-services.json-更改了package_name-我是否需要创建一个新的配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆