I followed the below link for renaming the package. After renaming when i try to build the projects android studio throws error like.
Android Studio Rename Package
Error:Execution failed for task ':app:processDebugGoogleServices'. No matching client found for package name 'com.example.app'
Step 1: To rename package name in Android studio open your project in Android mode first as shown in the below image. Step 2: Now click on the setting gear icon and deselect Compact Middle Packages. Step 3: Now the packages folder is broken into parts as shown in the below image.
The package name of an Android app uniquely identifies your app on the device, in Google Play Store, and in supported third-party Android stores.
Yes it works, but it shouldn't. It makes no sense that an app declared with one package name and registered in firebase with different package name, and they are still connected to each other. That's definitely a bug from Google and there are no guaranties that this won't break in the future.
You have added the Google Play Services plugin to the project, which reads from the google-services.json
found in your app module.
The google-services.json
contains service configuration data, such as Google Project ID, application package name, etc..
Since the application package name is also stored in that json, it will not match anymore, so you have to create a new application in your Firebase console, and export the new configuration json.
Then replace the google-services.json
in your project with the one you have generated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With