Resolve unresolved default_web_client_id

how to resolve unresolved default_web_client_id firebase auth!

The F u c k !
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:

click as per sequence
Copy web client id

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.

Happy Coding!

P.s. checkout my blogger, maybe you discover something new!

Coding enthusiast! love Android #kotlinAlltheWay, want to explore all opportunity around it! CodingMantra: #cleanCoder #TDD #SOLID #designpatterns

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store