Android. Firebase: Different Applicationidsuffix. Where Save Google-services.json?
I has project with 2 build types. Every build type has specific applicationIdSuffix. BuildType : dev , applicationIdSuffix = .dev BuildType : prod , applicationIdSuffix = .prod In
Solution 1:
Firebase already supports that, you should create a new project, then add 2 new apps for each build type (mypackage.prod and mypackage.dev) or flavor.
Once done, just export the google-services.json of the last created app (dev), the file should contain details of both apps, like the following
"client_info":{"mobilesdk_app_id":"...","android_client_info":{"package_name":"mypackage.dev"}},"client_info":{"mobilesdk_app_id":"...","android_client_info":{"package_name":"mypackage.prod"}
Solution 2:
You just need to replace the google-services.json
with existing one.Because Firebase automatically generates all the necessary attributes in google-services.json
file having multiple build flavors in single project
Just remember every-time download new google-services.json
and replace it after adding new flavor in your existing project
Post a Comment for "Android. Firebase: Different Applicationidsuffix. Where Save Google-services.json?"