1 fingerprint certificate in Android Studio for debug mode?

I have shifted myself from Eclipse to Android Studio. Now I am trying to work on my Map app. So I need my SHA-1 fingerprint certificate number.

When I was using Eclipse 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 Windows. 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 it is an illegal option .

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

Is there a way to find the SHA-1 fingerprint from Android Studio like it was very easy in Eclipse? As I am newbie in Android Studio, what is the full process to find it?

Another thing I want to add is that I have my Eclipse generates the SHA-1 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?


Easiest ways ever:

Update added for Android Studio V 2.2 in last step

There are two ways to do this.

1. Faster way :

  • 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 (root))
  • Click on Tasks
  • Click on Android
  • Double Click on signingReport (You will get SHA1 and MD5 in Run Bar (Sometimes it will be in Gradle Console))
  • Select app module from module selection dropdown to run or debug your application
  • Check the screenshot below:

    在这里输入图像描述

    2. Work with Google Maps Activity :

  • Open Android Studio
  • Open Your Project
  • Click on File menu -> Select New -> Click on Google -> Select Google Maps Activity
  • A dialog would appear -> Click on Finish
  • Android Studio would automatically generate an XML file named with google_maps_api.xml
  • You would get debug SHA1 key here (at line number 10 of the XML file)
  • Check Screenshot below:

    在这里输入图片说明

    Android Studio V 2.2 Update

    There is an issue with Execution .

    Solution:

  • Click on Toggle tasks execution/text mode from Run bar
  • Check Screenshot below:

    在这里输入图像描述

    Done.


    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 command:

    C:Program FilesJavajdk1.7.0_71bin>
    

    Now type in the below command in your command window (CMD.EXE):

    keytool -list -v -keystore c:usersyour_user_name.androiddebug.keystore -alias androiddebugkey -storepass android -keypass android
    

    Example:

    keytool -list -v -keystore c:usersJames.androiddebug.keystore -alias androiddebugkey -storepass android -keypass android
    

    Or you can just write this in cmd if you don't know the username:

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

    And you will get the SHA1.

    Then I created a new key from https://code.google.com/apis/console because of my package name got changed and then use this key in my application. It works fine.

    Make sure you are in BIN folder of jdkX.X.X_XX (my folder name is jdk1.7.0_71) , or else if you don't know what folder name you have then find it by opening the Java folder, and you will see what the folder name is, but you must be in your BIN folder and then run this command. Today I have got my SHA1 value in a cmd command window by the above procedure.

    SNAPSHOT:

    在这里输入图片说明


    I just found the case to get SHA-1 in Android Studio:

  • Click on your package and choose New -> Google -> Google Maps Activity
  • Android Studio redirects you to google_maps_api.xml
  • And you will see all you need to get google_maps_key .

    图片

    链接地址: http://www.djcxy.com/p/14316.html

    上一篇: Visual Studio 2010发布Web功能不包括所有DLL

    下一篇: Android Studio中的1个指纹证书用于调试模式?