How to obtain SHA1 Keys for debug and release — Android Studio [Mac]
Debug Key
Click on the Gradle tab on the right hand side of the Android Studio window.
Go to the Project root folder -> Tasks -> android -> signingReport
UPDATE: (Newer versions) In case you don’t find an android folder here, go to :app instead of root, navigate to Tasks>android and you’ll find signingReport.
Double click on signingReport, this will build and post the SHA1 in the bottom view.
Release
Method 1
In Android Studio, go to Build menu -> Generate Signed Bundle / APK
Select your keystore and key alias.
Copy the key store path and the key alias.
Here, the path is /Users/technofreek/Documents/testkeystore
and the alias is key0.
Open terminal and type the command
keytool -list -v -keystore <your keystore path> -alias <your alias>
For this example, here’s the command
keytool -list -v -keystore /Users/technofreek/Documents/testkeystore -alias key0
This will print your SHA1
Method 2
If you have enabled App Signing for your app in your Google Play Developer Console, by uploading your signing certificate, then just go to your developer console and select your app.
Select Release Management -> App Signing, and you’ll see you release SHA1.
Originally published at Fabcoding.