setu basak setu basak - 6 months ago 445
Android Question

How to get the SHA1 fingerprint certificate in android studio for debug mode?

I have shifted myself from

Android Studio
. Now I am trying to work on my Map app. So I need my
SHA1 fingerprint
certificate number. When I was using
it was right under Windows -> Preferences -> Android -> Build. But in android studio I couldn't find out any option like this so that I could find easily the fingerprint. I am using
. I have read from this link that

Android Studio signs your app in debug mode automatically when you
run or debug your project from the IDE.

So I tried to run this in command line after setting my
java bin path
from this link and unfortunately couldn't find my fingerprint. It is saying that Illegal Option.

keytool -list -v -keystore "\debug.keystore"
-alias androiddebugkey -storepass android -keypass android

Is there any way to find
SHA1 fingerprint
android studio
like it was very easy in
?? As I am newbie in android studio can anyone give the full process to find it??

EDIT: Another thing I want to add that I have my eclipse generated
SHA1 fingerprint
and previously I have my app registered on that fingerprint in
google developer console
and I worked on that app in eclipse by that
api key
. Is the same api key can be worked on this my project in
Android Studio

Important Note: I have an answer alternative with the accepted answer. Sometimes this happens. So don't forget to look on that..


My Problem is the same as i have also shifted my google maps project from Eclipse to Android Studio. I have solved my problem by following this:-

Go to your java bin directory via the cmd:

C:\Program Files\Java\jdk1.7.0_71\bin>

Now type in the below command in your cmd:

keytool -list -v -keystore c:\users\your_user_name\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android


keytool -list -v -keystore c:\users\James\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android

or you can just write this in cmd if you dont know username

keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

and you will get SHA1

then i created new key from because of my package name got changed and then use this key in my application. works fine.

make sure you are in BIN folder of jdkX.X.X_XX(mine folder name is jdk1.7.0_71) , or else if you dont know what folder name you have then find it by opening java folder and you will see what folder name is but you must be in your BIN folder and then run this command , today i have got my SHA1 value in cmd command by the above procedure.


enter image description here