I am trying to follow the Android mapping tutorial and got to this part where I had to get an API key.
I have found my debug.keystore
but there does not appear to be a keytool
application in the directory:
C:\Documents and Settings\tward\\.android>ls
adb_usb.ini avd debug.keystore repositories.cfg androidtool.cfg ddms.cfg default.keyset
There is also no keytool
in this directory:
C:\Android\android-sdk-windows\tools>ls
AdbWinApi.dll apkbuilder.bat etc1tool.exe mksdcard.exe
AdbWinUsbApi.dll ddms.bat fastboot.exe source.properties
Jet dmtracedump.exe hierarchyviewer.bat sqlite3.exe
NOTICE.txt draw9patch.bat hprof-conv.exe traceview.bat
adb.exe emulator.exe layoutopt.bat zipalign.exe
android.bat emulator_NOTICE.txt lib
I am using Eclipse as my editor and believe that I have downloaded all the latest SDK.
What am I doing wrong?
I never installed Java, but when you install Android Studio it has its own version within the Android directory. Here is where mine is located. Your path may be similar. After that you can either put the keytool into your path, or just run it from that directory.
The 4-Step Answer above worked for me, but it returns the SH1-key... but Google asks for the MD5-key to generate your API key.
One needs simply to add a '-v' in the command in step 3. -like so:
Updated 4-Step Answer
Ok I did this in Windows 7 32-bit system.
step 1: go to - C:\Program Files\Java\jdk1.7.0\bin - and run jarsigner.exe first ( double click)
step2: locate debug.keystore (in Eclipse: Windows/Preferences/Android/build..), in my case it was - C:\Users\MyPcName.android
step3: open command prompt and go to dir - C:\Program Files\Java\jdk1.7.0\bin and give the following command: keytool -v -list -keystore "C:\Users\MyPcName.android\debug.keystore"
step4: it will ask for Keystore password now. The default is 'android'
No need to use the command line.
If you FILE-> "Export Android Application" in the ADK then it will allow you to create a key and then produce your .apk file.
In fact, eclipse export will call
and then call com.android.sdklib.internal.build.SignedJarBuilder.