Well all works till i generate the signed apk . I followed the entire process as told on the google developers page
1.I generated the google-services.json file with
If you have opted App Signing, you need to put the SHA1 generated from developer console
App Signing
For Firebase, put the same SHA1 in your Project Setting