c-an
c-an

Reputation: 4090

No google-services.json but still fetching the remote config from my Firebase project

I was trying to change google-services.json file of new project from old one. So, I deleted the old one and pasted new json file in two places one by one to test.

  1. app/
  2. app/src

1 case didn't work, so, tried 2 case. But didn't work either. Both cases fetch config from the old project.

So, I deleted app completely in the project. And then tried. Still working!

And then, I deleted all google-services.json files in my laptop. And then tried. BUT STILL WORKING.

How can I solve this problem?

Upvotes: 5

Views: 2581

Answers (3)

Mohammad Elsayed
Mohammad Elsayed

Reputation: 2066

The above answers are correct but they are not covering all cases, in my case my Android Project Id was different from the one created inside the firebase project (why? because they have been created by two different persons xD).

SOLUTION: open the google-services.json and change the package_name and bundle_id from the id they are coming with to your application package(can be found in the manifest or build.gradle files)

Upvotes: 0

CoolMind
CoolMind

Reputation: 28835

I changed Firebase project (changed google-services.json in app folder). As Mayur Sojitra said,

  • remove app/build folder,

  • rebuild a project,

  • uninstall an application,

  • run the application.

After this new Firebase project properties have been fetched.

Upvotes: 0

Mayur Sojitra
Mayur Sojitra

Reputation: 712

Invalidate cache & Restart Android Studio

OR

Delete app/build Directory from explorer or finder & Rebuild Project

Upvotes: 17

Related Questions