请宽大,我是一个新手,所以这里是我的google-services.json文件,所以一旦我改变我的包名和google-services.json到 "com.oldapp.app",计费工作正常,但只要我把它改为 "com.NewApp.app "包名,并更新到新的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"
} ```
如果不在控制台中同时添加一个新的app到Firebase项目中,就不支持更改app的包名(application ID)。在控制台中注册一个新的应用程序然后删除旧的。正如链接的文档所说。
确保你输入的包名是你的应用程序实际使用的。在你把你的app注册到Firebase项目后,你就不能添加或修改这个值了。
伤透了脑筋后,我发现我没有把产品添加到新的包中,在播放控制台添加产品后,一切都恢复了正常。