Android Studio Gets the most detailed method for developing SHA1 values and release SHA1 values in the history

Source: Internet
Author: User
Tags sha1

Preface: Use Baidu map when need secret key, request secret key need SHA1 value, so today summarizes how to get this value.

Under normal circumstances:

First, get the development version of SHA1:

Here I directly use the command console provided by Androidstudio, after all, do Android development is almost all with Android studio.

1. Open Android Studio to find terminal and open it, or find terminal at the bottom like:


2. Enter Command c: Enter the C drive; (Mac enter ~)

3, then enter the command CD Users\administrator which Administrator is their own user name Administrator file has a. adnroid file, enter the command CD. Android, finally found. Android Oid


4. Enter command keytool-list-v-keystore Debug.keystore where Debug.keystore is studio default KeyStore, press Enter and enter secret key: Android (System default) carriage return (keystore password is not visible) such as:


This will successfully get to the development version of the SHA1 value, is not very simple ah, that is of course! Test can be obtained directly
Keytool-list-v-keystore ~/.android/debug.keystore-alias androiddebugkey-storepass android-keypass Android
Second, get the release version of the SHA1:

Get the release version of the SHA1, and get the development version of the SHA1 1, 2, 3 steps, the difference is the 4th step slightly different.

1, ibid.

2, ibid.

3, ibid.

4, enter the command keytool-list-v-keystore file directory \ own signature file such as my: Keytool-list-v-keystore e:\ signed file \android.keystore, then press ENTER, and then enter the secret key: (I Only Know me, haha) enter (keystore password is not visible) such as:


This will successfully get to the release version of the SHA1 value, is not very simple ah, that is of course! another way to get a development version

1. Open Terminal
CD to Android Studio under file path

2. Input keytool -list

3.
Displays the KeyStore entry, which will prompt you to create a new entry the first time you build
秘钥库文件不存在
Input keytool -v Get Management method

4. Create a new KeyStore
keytool -genkeypair
Fill in your secret key and your personal information

5, through the keytool -list acquisition of fingerprint certificate SHA1:

The above is under normal execution, I was in the acquisition of SHA1 when the pit, the next is the abnormal situation:

1, the first is to appear:

' Keytool ' is not an internal or external command, nor is it a program or batch file that can be run.

So I refer to an article: http://blog.csdn.net/csdnhejingzhou/article/details/50643246, it can really solve the problem;

2, the previous problem solved, and then I follow his steps to directly run Deybug.keystore, that is, C:\Program FILES\JAVA\JDK1.8.0_31\BIN>CD Keytool.exe

But there is another problem: the hint directory name is invalid.

At last I put C:\Users\Administrator\ directly. The Debug.keystore copy under the Android directory is under the C:\Program Files\java\jdk\bin directory, which is the same directory as the Debug.keystore.

Reference: https://www.jianshu.com/p/764c1712b89a 49741543

Android Studio Gets the most detailed method for developing SHA1 values and release SHA1 values in the history

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.