Is the method for getting a SHA-1 fingerprint the same as the method of getting the a fingerprint? Previously, I was running this command:
I saw lots of posts about this issue, so I will keep it simple + examples.
To get the SHA1 for ClientID for Sign In with Google+ and more actions:
General Form:
keytool -list -v -keystore <your_keystore_full_path> -alias <your_alias_name>
For Debug, replace with your debug.keystore path, for Example :
keytool -list -v -keystore C:\Users\DAVID\.android\debug.keystore -alias androiddebugkey
Password: android
For Release, replace with your keystore path and alias password, for Example :
keytool -list -v -keystore C:\ProjectsData\keystore\my-release-key.keystore -alias alias_name
Password: Your alias password.
Step 1 : First locate your JDK's bin folder in your windows pc. See the image below.
Mine is :
C:\Program Files\Java\jdk1.8.0_131\bin
Step 2 : Now search for Command Prompt by typing "cmd" in windows 10 search bar. Then open Command Prompt as Administrator mode. See the image below:
Step 3 : Now copy this path and type it into Command Prompt
C:\Program Files\Java\jdk1.8.0_131\bin
In Command Prompt :
cd C:\Program Files\Java\jdk1.8.0_131\bin
After pressing Enter button you will go to the bin folder.
Your setup is done. Now generate your SHA1 key for Release mode.
Release SHA1 Key :
keytool -list -v -keystore C:\Users\Turzo\Desktop\earninglearning.keystore -alias turzo -storepass 12345678 -keypass 12345678
Easiest way for getting SHA1 Key in android studio both (Debug and release Mode)
Android Studio
signingReport
(You will get SHA1
and MD5
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.
Open Command Prompt in Windows and go to the following folder .
C:\Program Files\Java\jdk1.7.0_05\bin
Use commands cd <next directory name>
to change directory to next.
Use command cd ..
to change directory to the Prev
Now type the following command as it is :
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
This solution is for android studio 3.5 version:
If you are using android studio use simple step
Tasks
treeandroid
-> signingReport
and see the magic 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