How to add SHA-1 to android application
SHA-1 generation in android studio:
Select Gradle in android studio from right panel
Select Your App
In Tasks -> android-> signingReport
Double click signingReport
.
You will find the SHA-1 fingerprint in the "Gradle Console"
Add this SHA-1 fingerprint in firebase console
If you are using Google Play App Signing you need to use the SHA1 from google play since Google will replace your release signing key with the one on googles server
Alternatively you can use command line to get your SHA-1 fingerprint:
for your debug certificate you should use:
keytool -list -v -keystore C:\Users\user\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
you should change "c:\Users\user
" with the path to your windows user directory
if you want to get the production SHA-1 for your own certificate, replace "C:\Users\user\.android\debug.keystore
" with your custom KeyStore path and use your KeystorePass and Keypass instead of android/android.
Than declare the SHA-1
fingerprints you get to your firebase console as Damini said