Reputation: 456
While building the android application I used my google account to create the Firebase database for testing and debugging. After completing the project, I have to make the application to access the client's database, i.e Firebase created with there google account.
However I am quite unsuccessful in doing so. I removed the old google-services.json
(config file) and replaced it with that of the newer database.
But the application is continuing to use the previous database instead of new one.
I do not need to transfer the data of previous database to the newer one. I just want it to access the client's database.
Upvotes: 0
Views: 38
Reputation: 106
As Doug Stevenson said changing JSON is not enough.
1.first delete your current JSON and paste your final JSON.
2.Then clean, rebuild your project.
3.Before installing in your device just make sure that you had uninstalled previous version of your app and then reinstall it. hope your problem might solved.
Upvotes: 1
Reputation: 317467
Just changing out the JSON config isn't enough - you will have to rebuild your application completely. Be sure to clean your project before building. Use "Build -> Rebuild project" in Android studio, or ./gradlew clean
before building again.
Upvotes: 1