play-services-plugins icon indicating copy to clipboard operation
play-services-plugins copied to clipboard

update google-services.json doesn't update the app

Open brianjmurrell opened this issue 5 years ago • 17 comments

Describe the bug When I update google-services.json and then rebuild/install my app, the google services values in my app are not updated to reflect the google-services.json changes.

I have to manually remove:

app/build/generated/res/google-services/debug/values/values.xml
app/build/intermediates/incremental/mergeDebugResources/merger.xml
app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml

in order to see the updated values.

To Reproduce Steps to reproduce the behavior: Probably pretty obvious.

Expected behavior If I update google-services.json the next build of my app should include the changed values.

Screenshots N/A

Desktop (please complete the following information):

  • Gradle version: I don't really know
  • Android Studio version: 3.6.3
  • Plugin name and version: firebase?

Additional context My particular case here is that if my firebase application ID is updated in google-services.json, ./gradlew install[Debug] does not update the application ID in the app.

brianjmurrell avatar May 19 '20 12:05 brianjmurrell

I had the same issue and followed your steps. It worked. Thank you. I was getting frustrated.

Ivy-Walobwa avatar Sep 03 '20 07:09 Ivy-Walobwa

@Ivy-Walobwa Glad it worked for you. Shame that this 6 month old bug has not even had a triage comment added to it.

brianjmurrell avatar Sep 03 '20 12:09 brianjmurrell

When you manually remove that information, what file are you removing that information from? I'm in the android studio and I don't see app/build/generated/res/google-services/debug/values/values.xml app/build/intermediates/incremental/mergeDebugResources/merger.xml app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml

Awdjr avatar Sep 07 '20 12:09 Awdjr

When you manually remove that information, what file are you removing that information from? I'm in the android studio and I don't see app/build/generated/res/google-services/debug/values/values.xml app/build/intermediates/incremental/mergeDebugResources/merger.xml app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml

It's under build/app/....

Instead you could run flutter clean

Ivy-Walobwa avatar Sep 07 '20 13:09 Ivy-Walobwa

I just had Exactly same problem, I uploaded the app on play store with a new firebase project (separate from development project). I thought just replacing google-services.json will do, but I was scratching my head why google sign in is not working even after adding the sha keys from play console. Turns out I added the SHA keys to the firebase project which was not even being used. Had to flutter clean for the change to take effect

shivamdev-lgtm avatar Dec 13 '20 03:12 shivamdev-lgtm

Facing the same issue

I Had to remove manually remove:

app/build/generated/res/google-services/debug/values/values.xml app/build/intermediates/incremental/mergeDebugResources/merger.xml app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml

junaid-umar avatar Dec 27 '20 10:12 junaid-umar

When you manually remove that information, what file are you removing that information from? I'm in the android studio and I don't see app/build/generated/res/google-services/debug/values/values.xml app/build/intermediates/incremental/mergeDebugResources/merger.xml app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml

It's under build/app/....

Instead you could run flutter clean

Thanks. flutter clean command work for me.

HarshCodonnier avatar Apr 30 '21 07:04 HarshCodonnier

I deleted the complete build folder:- app/build

Delete old google-services.json file from these locations:- app\src\debug\google-services.json app\src\google-services.json app\google-services.json

Then add a new google-services.json file under app/ And then it worked for me.

abhinavgl98 avatar Jun 15 '21 11:06 abhinavgl98

app/build/generated/res/google-services/debug/values/values.xml app/build/intermediates/incremental/mergeDebugResources/merger.xml app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml

Thank you, this helped me.

prithvish111 avatar Jul 17 '21 16:07 prithvish111

It is absolutely insane that it has been over a year and this has not been properly addressed.

ngattusohw avatar Aug 19 '21 04:08 ngattusohw

Just had to deal with this same issue. A simple clean was able to resolve it fortunately. Firebase Auth UI, Crashlytics, Analytics, none of it was working and this fixed it all in one go.

travisw88 avatar Sep 25 '21 00:09 travisw88

Worked great! Thank you very much!

jdcaacbay-wp avatar Oct 01 '21 12:10 jdcaacbay-wp

Thanks Man.I Was getting error that the firebase url is not set to the proper location, even though I updated the google-services.json file. Finally was able to retrieve data from the firebase database.

Sumit112192 avatar Oct 18 '21 12:10 Sumit112192

Omg, I was getting crazy with that issue, thinking I did something wrong, but it was a Firebase problem 🤦

ernesto avatar Oct 24 '21 03:10 ernesto

Bro you saved me ! thank you

Necati-Ustun avatar Dec 04 '21 14:12 Necati-Ustun

You save my day . love u

nikeru8 avatar Dec 24 '21 03:12 nikeru8

In my case these files didn't exist

app/build/generated/res/google-services/debug/values/values.xml
app/build/intermediates/incremental/mergeDebugResources/merger.xml
app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml

So i ran react-native clean, selected all the options and my problem was fixed

DHx64 avatar Feb 05 '23 22:02 DHx64