Below code I am using for Google login.I added google-services.json file in the app folder.I am using classpath \'com.google.gms:google-services:2.0.0
Thanks Aleksey Gureiev for hinting... I solved my problem by making sure debug keys are actually used during builds..
For me in Android Studio the issue was the Signing Config was not set at all. I am still wondering how it happened.
Once I set Signing Config to my config with name "debug" then it all started working.