play-services-plugins: update google-services.json doesn't update the app
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.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 57
- Comments: 17
It’s under build/app/…
Instead you could run flutter clean
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.
It is absolutely insane that it has been over a year and this has not been properly addressed.
I had the same issue and followed your steps. It worked. Thank you. I was getting frustrated.
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
@Ivy-Walobwa Glad it worked for you. Shame that this 6 month old bug has not even had a triage comment added to it.
Omg, I was getting crazy with that issue, thinking I did something wrong, but it was a Firebase problem 🤦
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.
Thanks. flutter clean command work for me.
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