Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio after renaming package it throws No matching client found

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'

like image 469
Sai Avatar asked Jan 21 '16 11:01

Sai


People also ask

Can I change package name Android?

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.

What is the Android package name?

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.

Can we change package name in firebase console?

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.


1 Answers

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.

like image 163
Daniel Zolnai Avatar answered Oct 15 '22 16:10

Daniel Zolnai