4

Trying to generate a debug key for the purposes of usings Maps.

I have tried this command

keytool -list -alias androiddebugkey \
-keystore ~/.android/debug.keystore.keystore \
-storepass android -keypass android

But I get this output:

keytool error: java.lang.Exception: Keystore file does not exist: /Users/chance 1/.android/debug.keystore.keystore

How to find and generate? Any help appreciated.

Johnny Rottenweed
  • 327
  • 1
  • 7
  • 16
  • `keytool -list` is used to list things that exist, so obviously it won't work with a key file that doesn't exist. Where did you find that command? – Wooble Dec 10 '12 at 18:03
  • Check out [this](http://stackoverflow.com/questions/9696288/androidgoogle-maps-api-key-signup-md5-certification-key/9696925#9696925) answer .. – Laksh Dec 10 '12 at 18:09

4 Answers4

4

Your command is a bit wrong, right command is:

keytool -list -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android -keypass android

(It is for Linux/Mac - enter in console, it will print Certificate fingerprint SHA1)

Andrew
  • 36,676
  • 11
  • 141
  • 113
0

Here is an excellent tutorial about generating a Maps API key. https://developers.google.com/maps/documentation/android/v1/mapkey

But to me it looks like the space in your username isn't being properly escaped. Try typing keytool -list -alias androiddebugkey \ -keystore /Users/chance\ 1/.android/debug.keystore.keystore \ -storepass android -keypass android

paulrehkugler
  • 3,241
  • 24
  • 45
0

I use XP so I navigated to the proper directory by opening a command prompt and typing: cd C:\Documents and Settings\HP_Administrator.android

Once you've navigated to the proper directory for your os, type this in... keytool -list -alias androiddebugkey -storepass android -keypass android -key store debug.keystore

Once you hit the enter key, you'll see something like this (the actual MD5 that we're interested in is the last line): androiddebugkey, Mar 10, 2009, PrivateKeyEntry, Certificate fingerprint (MD5): D1:16:4A:BD:73:73:A4:56:9D:CD:9A:44:A2:6C:11:AC

Md Abdul Gafur
  • 6,213
  • 2
  • 27
  • 37
0

My command in cmd...

D:\Java_Install\jdk1.8.0_121\bin\keytool.exe -list -v -keystore "D:\UnityProjects\UnityMobileGameCreator\myapkkeystore.keystore" -storepass YOUR_KEY_STORE_PASS -keypass YOUR_KEY_PASS

Unity has two password box's in publishing settings use these passwords in the text above, NOTICE "Keystore & Key" in publishing settings in the "Player" dialogues in unity

Replace the path to your keystore, enter the keystore password, the key password, then paste the text into cmd and run you'll get your keystore data back in the cmd window.