Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
452 views
in Technique[技术] by (71.8m points)

android - Keytool alias does not exist

I am trying to get my debug.keystore md5 key so I can get the API key for Google Maps.

I run the command:

 keytool –genkeypair -alias armand -keypass pass

And then running the command:

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

What am I doing wrong?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This is right a way to get key:

To get certificate fingerprint (MD5) follow the steps below:

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

(Or)

C:Documents and Settings<username>.android

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

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:

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...