how to resolve unresolved default_web_client_id firebase auth!
Cannot resolve symbol default_web_client_id
It’s a very common error to run into while adding a google sign-in button to your android app using firebase auth, this is caused by two reasons, first is your google credential API for auths are misconfigured .i.e. the reason why your google-service.json file from firebase doesn't contain this web client key, and the other is that your gradle plugin for google-services of project level isn't generating vaules.xml properly for google services.
If its the second issue mostly syncing your gradle file, cleaning and rebuilding or invalidating and restarting your IDE will do the trick, If you have tried that and it didn't help then its the first reason and the most probable reason you're still continuing reading this post. welcome.🎉
We can’t add the value of default_web_client_id to the Value.xml as its auto-generated by gradle. But you can manually add this value to your local Strings.xml.
How to get the Value?
let the picture do the talking:
After copying that value from firebase panel, save it to your strings.xml as default_web_client_id .
Alternatively, you can also go to Google API panel and copy web client value from there.
Your app will build and Sign in should work.
P.s. checkout my blogger, maybe you discover something new!