Reputation: 12905
I try to generate a MD5 fingerprint to obtain a map api key using Java7.
I do it on the way, described at developer page
"C:\Program Files\Java\jdk1.7.0\bin\keytool" -list -alias androiddebugkey -keystore C:\Users\username\.android\debug.keystore -storepass android -keypass android
The problem is, I'm getting SHA1 Fingerprint and not MD5
androiddebugkey, 01.08.2011, PrivateKeyEntry,
Certificate fingerprint (SHA1): xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Any ideas why?
Thnak you in advance
Upvotes: 3
Views: 1686
Reputation: 8158
Interesting. Well, you can get the entire cert information using this command.
keytool -list -v -keystore C:\Users\username\.android\debug.keystore
You'll need to enter android
as the password when prompted. That will give you everything in the keystore, which should only be one certificate rather than looking for a specific alias. It should show you both an MD5 and a SHA1 fingerprint. Give that a try and let me know.
The only thing I can think of is that jdk1.7's keytool gets information differently than jdk1.6(returns SHA1 by default?). This is just a guess and has not been verified but it is the only thing I can really think of.
Edit: It appears my guess might be correct. JDK 7 changes keytool output
Upvotes: 4
Reputation: 12905
Ok. I solved the problem with this answer
I changed my call to "C:\Program Files\Java\jre6\bin\keytool" and ... everything works
Upvotes: 0