Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: keytool error on the command line when locating debug.keystore

I'm trying to generate the MD5 fingerprint from the debug.keystore file using keytool.exe in my JDK so I can use Google Maps in my Android project. I've located the keystore file and have moved it into C:\android just to make things easier.

Then in a command prompt I type

c:\Program Files\Java\jdk1.5.0_13\bin>keytool -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android

And I keep getting the error:

keytool error: java.lang.Exception: Keystore file does not exist: C:\android\debug.keystore

I've also tried entering the keystore in from its original location rather than moving to c:\android but I still get the same error.

Does anyone have any idea why this is happening? Also, is there any other way to get this MD5 fingerprint? Some program maybe?

like image 885
Capsud Avatar asked Nov 29 '22 18:11

Capsud


2 Answers

to generate debug.keystore file

in Eclipse/ADT, go to Windows > Preferences > Android > Build

once it is generated use ur command(c:\Program Files\Java\jdk1.5.0_13\bin>keytool -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android) to generate MD5.

this is used to generate api key for google map.

like image 91
Hiren Dabhi Avatar answered Dec 05 '22 20:12

Hiren Dabhi


You should execute the keytools from c:\Program Files (x86)\java\jre6\bin>

And here execute the keytool command without "\"

keytool -list -alias androiddebugkey -keystore C:\Users\<you_user_name>\.android\debug.keystore -storepass android -keypass android

It will work!

like image 42
Daniel Ponce Avatar answered Dec 05 '22 19:12

Daniel Ponce