SHA-1 fingerprint of keystore certificate
Is the method for getting an SHA-1 fingerprint the same as the method of getting the fingerprint? Previously, I was running this command:
It's not clear to me if the result I'm getting is the SHA-1 fingerprint. Can somebody clarify this?
Follow this tutorial for creating SHA1 fingerprint for Google Map v2
For Debug mode:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
for Release mode:
keytool -list -v -keystore {keystore_name} -alias {alias_name}
example:
keytool -list -v -keystore C:\Users\MG\Desktop\test.jks -alias test
On windows, when keytool command is not found, Go to your installed JDK Directory e.g.
<YourJDKPath>\Java\jdk1.8.0_231\bin\
, open command line and try the above commands for debug/release mode.
Another way of getting your SHA1 OR SHA-256 use ./gradlew signingReport
For more detailed info visit Using Gradle's Signing Report
If you are using android studio use simple step
- Run your project
- Click on Gradle menu
- Expand Gradle
Tasks
tree - Double click on
android
->signingReport
and see the magic - It will tell you everything on the Run tab
Result Under Run Tab If Android Studio < 2.2
From android studio 2.2
Result will be available under Run console but use highlighted toggle button
Or
Second Way is
Create new project in android studio New -> Google Maps Activity
then open google_maps_api.xml xml file as shown in pics you will see your SHA key
Easiest way for getting SHA1 Key in android studio both (Debug and release Mode)
- Open
Android Studio
- Open Your Project
- Click on Gradle (From Right Side Panel, you will see Gradle Bar)
- Click on Refresh (Click on Refresh from Gradle Bar , you will see List Gradle scripts of your Project)
- Click on Your Project (Your Project Name form List)
- Click on Tasks/Android
- Double Click on
signingReport
(You will getSHA1
andMD5
in Run Bar)
If you are using new Android Studio it shows time to execute on top there is Toggle task execution mode click on that you will get you SHA-1 key. Check 2nd and 3rd reference images.
Generate SHA-1 for Release Mode
1-First add keystore config in your gradle How to add config in gradle.
2-After Adding Config in gradle change build variant.
3-Then Follow Above Procedure you will get SHA-1 for release mode.
4-Check Image.