Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
439 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 Answer

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...