密钥库证书的SHA-1指纹

本文介绍了如何获取Android应用的SHA-1证书指纹,这对于配置Google Maps v2等服务至关重要。在调试和发布模式下,分别提供了获取SHA-1指纹的命令。在Eclipse中,可以通过Window->Preferences->Android->Build找到相关信息。同时,文章提供了一个分步教程,指导如何在Android 4.2.2模拟器上使用Google Maps Android V2。
摘要由CSDN通过智能技术生成

本文翻译自:SHA-1 fingerprint of keystore certificate

Is the method for getting a SHA-1 fingerprint the same as the method of getting the a fingerprint? 获取SHA-1指纹的方法是否与获取指纹的方法相同? Previously, I was running this command: 以前,我运行以下命令:

运行keytool.exe的Windows命令提示符

It's not clear to me if the result I'm getting is the SHA-1 fingerprint. 我不清楚我得到的结果是否为SHA-1指纹。 Can somebody clarify this? 有人可以澄清吗?


#1楼

参考:https://stackoom.com/question/13zY0/密钥库证书的SHA-指纹


#2楼

Follow this tutorial for creating SHA1 fingerprint for Google Map v2 请按照教程为Google Map v2创建SHA1指纹

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

#3楼

Run the following command to get your sha1: keytool -v -list -keystore "< debug.keystore path >" 运行以下命令以获取您的sha1: keytool -v -list -keystore "< debug.keystore path >"
If you do not know the path of debug.keystore , you may find your debug.keystore path by checking windows-->preferences-->android-->build 如果您不知道debug.keystore的路径,则可以通过检查debug.keystore windows-->preferences-->android-->build来找到debug.keystore路径。

I prepared step by step tutorial to show how you can use google map android v2 on emulator(android 4.2.2) 我准备了分步教程来展示如何在模拟器上使用google map android v2(android 4.2.2)
have a look at to my blog: http://umut.tekguc.info/en/content/google-android-map-v2-step-step 看看我的博客: http : //umut.tekguc.info/en/content/google-android-map-v2-step-step


#4楼

If you are using eclipse, go to: Window->Preferences->Android->Build You will find what you are looking there. 如果您使用的是eclipse,请转到: 窗口->首选项->安卓->构建您将在其中找到所需的内容。

在此处输入图片说明


#5楼

First there is same .jar file that in fb-sdk android-support-v4.jar . 首先,在fb-sdk android-support-v4.jar存在相同的.jar文件。
Then generate SHA1 key using: 然后使用以下命令生成SHA1密钥:

PackageInfo info;
try {

    info = getPackageManager().getPackageInfo(
        "com.example.worldmission", PackageManager.GET_SIGNATURES);

    for (Signature signature : info.signatures) {
        MessageDigest md;
        md = MessageDigest.getInstance("SHA");
        md.update(signature.toByteArray());
        String something = new String(Base64.encode(md.digest(), 0));
        Log.e("Hash key", something);
        System.out.println("Hash key" + something);
    }

} catch (NameNotFoundException e1) {
    Log.e("name not found", e1.toString());
} catch (NoSuchAlgorithmException e) {
    Log.e("no such an algorithm", e.toString());
} catch (Exception e) {
    Log.e("exception", e.toString());
}

#6楼

Go to your java bin directory via the cmd: 通过cmd转到Java bin目录:

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

Now type in the below comand in your cmd: 现在,在您的cmd中键入以下命令:

keytool -list -v -keystore "c:\users\your_user_name\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值