Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change Firebase project in Android Studio module

My android project initially was connect to a Firebase project. I need to connect the app to a different project.

I use the "Firebase Assistant" and it kept on complaining:

The app is already connected to a project "xxx". 
Click "Sync" to update the configuration info
Additional Info: 
Package Name: "xxxxx" 
SHA1: "xxxxx"

If I create a brand new AS project just to test it out, the new AS project does give me choices to pick the old or the new one.

I have tried many ways, manually download the google-service.json file, or tried to clean as much as I can from build, etc. But somehow my Android studio project still not allow me to choose the new Firebase Project I setup in console.

Please share any tips to achieve my goal, and thanks for your help in advance.

like image 314
Sean Avatar asked Jan 23 '18 18:01

Sean


People also ask

Can I change Firebase project name?

A project ID cannot be changed after the project is created, so if you are creating a new project, be sure to choose an ID that you'll be comfortable using for the lifetime of the project. Save this answer.

Can you connect more than one Firebase project to your Android app?

However, when you want to access multiple projects from a single application, you'll need a distinct Firebase application object to reference each one individually. It's up to you to initialize these other instances.


1 Answers

I came across this issue and I managed to solve it by deleting the google-services.json file and then initiating the connect to firebase method again.

like image 174
amzer Avatar answered Sep 18 '22 11:09

amzer