更改了我的包名,更新了 google services.json 文件,计费和付款停止工作
Posted
技术标签:
【中文标题】更改了我的包名,更新了 google services.json 文件,计费和付款停止工作【英文标题】:changed my package name, updated the googleservices.json file, billing and payment stops working 【发布时间】:2020-08-29 06:23:12 【问题描述】:请宽容,我是新手。 所以这是我的 google-services.json 文件 因此,一旦我将包名称和 google-services.json 更改为“com.oldapp.app”,计费工作正常,但一旦我将其更改为“com.NewApp.app”包名称并更新为新的谷歌-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"
```
【问题讨论】:
【参考方案1】:不支持更改应用程序的包名称(应用程序 ID)而不在控制台中将新应用程序添加到 Firebase 项目。 Register a new app in the console,然后删除旧的。正如链接文档所说:
确保输入您的应用实际使用的包名称。将应用注册到 Firebase 项目后,您将无法添加或修改此值。
【讨论】:
好吧,我确实在 Firebase 控制台上注册了一个新应用程序,并在我的项目中使用了该应用程序服务文件。好像没有解决问题【参考方案2】:数小时后,我意识到我没有将产品添加到新包装中,在游戏控制台中添加产品后一切恢复正常。
【讨论】:
以上是关于更改了我的包名,更新了 google services.json 文件,计费和付款停止工作的主要内容,如果未能解决你的问题,请参考以下文章
如何在Java生成的文件中更改android中的包名称[重复]
如何在 android studio 中更改我的包名?当我进行重命名时,文件会以新名称重复[重复]