how to change Firebase project in Android Studio module
Asked Answered
E

1

8

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.

Edeline answered 23/1, 2018 at 18:43 Comment(7)
you have to change the project settings for your new firebase project like package name, SHA1. then you have to download new google-services.json and place it in your app folder and rest i think you know.Estremadura
The app is already in production/PlayStore. changing package probably is not an option for me. Can I change SHA1 and the app still appears the same app in PlayStore? Where to change the SHA1?Edeline
for this you need to create different keystore for development process, from generated keystore you will get different SHA1, which can be used in firebase.Estremadura
SHA1 is linked to keystore used for signing the app. And Google play console will not allow you to upload app signed with different keyEntoil
I strongly agree with AbdulAli, but if @Edeline need to make an development project on firebase then you can use by creating different SHA1.Estremadura
As long as I can get the production build working, I care less on development/debug build at this moment :-(Edeline
@Edeline Did you ever get this working? I have the same problem right now.Censorship
O
1

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.

Overexcite answered 6/1, 2022 at 5:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.