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?
I had the same message and when checking the C:\user.android directory could see that the debug.keystore file was not present. As this was the first time I'd tried an android project on this machine, there had been no previous builds. I created and ran the ubiquitous 'Hello World' project and debug.keystore was instantly created. I then ran keytool and the MD5 appeared fine
Tells me that file isn't there like you think it is.
Also, if you are using the Eclipse Android tools, you can export a signed APK file via Eclipse, which might be easier for you than using the command line tools.
You should execute the keytools from
c:\Program Files (x86)\java\jre6\bin>
And here execute the keytool command without "\"
It will work!
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.
There are times when your .android folder is present in the
C:\Documents and Settings
path. Often, because of the spaces inDocuments and Settings
, the command will not run properly.It's better if you just create a test folder under
C:
and put yourdebug.keystore
file in this folder. Then give the path as:This works. If somebody is facing issues and getting an error on this command, you can try your luck with this.
You might try adding
c:\Program Files\Java\jdk1.5.0_13\bin
to yourPATH
, then running thekeytool
command from theC:\android directory
. That's what I do (more or less -- I have JDK6 and a different directory), and it works fine.