Keytool 别名不存在 [英] Keytool alias does not exist
问题描述
我正在尝试获取我的 debug.keystore
md5 密钥,以便获取 Google 地图的 API 密钥.
I am trying to get my debug.keystore
md5 key so I can get the API key for Google Maps.
我运行命令:
keytool –genkeypair -alias armand -keypass pass
然后运行命令:
keytool -list -alias armand -keystore debug.keystore
然后我输入我的密码,它给了我以下错误:
I then enter my password and it gives me the following error:
keytool error: java.lang.Exception: Alias <armand> does not exist
我做错了什么?
推荐答案
这是正确的获取key的方法:
要获取证书指纹 (MD5),请按照以下步骤操作:
To get certificate fingerprint (MD5) follow the steps below:
您需要获取密钥库文件以获取证书指纹(MD5).可以在以下路径找到您的密钥库文件:
You need to get the keystore file for getting the certificate fingerprint (MD5). Your keystore file can be found at the following path:
C:Documents and Settings<username>Local SettingsApplication DataAndroid
(或)
C:Documents and Settings<username>.android
密钥库文件名为 debug.keystore
.将debug.keystore"文件复制到其他文件夹(例如:-D:Androidkeystore")(使用起来很友好).打开命令提示符并转到 Java 安装目录.("C:Program FilesJava\bin")然后输入以下行(在框中给出)并按 Enter.
Keystore file name is debug.keystore
.
Copy the "debug.keystore" file to some other folder (ex: - "D:Androidkeystore") (it's user friendly to use).
Open command Prompt and go to the Java installed directory. ("C:Program FilesJava\bin")
Then type the below line (given in box) and press enter.
keytool.exe -list -alias androiddebugkey -keystore "D:AndroidKeystoredebug.keystore" -storepass android -keypass android
这里的MD5证书指纹是
Here the MD5 certificate fingerprint is
64:88:A2:FC:AA:9F:B1:B0:CA:E4:D0:24:A8:1E:77:FB
这是有效的,但我在这里遇到了小错误:
This is working, but I am getting small error here:
这是我的路径-C:ANDROIDJavajdk1.6.0in>keytool.exe -list -alias androiddebugkey -keystore"C:ANDROIDdebugkeydebug.keystore"-storepass android -keypass android
this is my path-C:ANDROIDJavajdk1.6.0in>keytool.exe -list -alias androiddebugkey -keystore"C:ANDROIDdebugkeydebug.keystore"-storepass android -keypass android
keytool error: java.lang.RuntimeException: Usage error, android is not a
legal command
这篇关于Keytool 别名不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!