javaandroidkeystore

Debug keystore won't work


I'm trying to use my debug keystore so I can get a key for a map view, but when I try and use it, it comes up with this

Illegal option:  B:\Fabian\.android\debug.keystore
keytool -list [OPTION]...

Im ussing this:

keytool -v -list -keystore "C:\Users\MyPcName.android\debug.keystore"

When I try to use:

keytool -list -alias androiddebugkey \ -keystore <path_to_debug_keystore>.keystore \ -storepass android -keypass android

it comes up with

C:\Program Files\Java\jdk1.7.0_04\bin>keytool -list -alias androiddebugkey \ -k
ystore B:\Fabian\.android\.keystore \ -storepass android -keypass android
Illegal option:  \
keytool -list [OPTION]...

Lists entries in a keystore

Options:

 -rfc                            output in RFC style
 -alias <alias>                  alias name of the entry to process
 -keystore <keystore>            keystore name
 -storepass <arg>                keystore password
 -storetype <storetype>          keystore type
 -providername <providername>    provider name
 -providerclass <providerclass>  provider class name
 -providerarg <arg>              provider argument
 -providerpath <pathlist>        provider classpath
 -v                              verbose output
 -protected                      password through protected mechanism

Use "keytool -help" for all available commands

Solution

  • Here is actually what you have to use to get a map api key :

    $ keytool -v -list -alias androiddebugkey \ -keystore <path_to_debug_keystore>.keystore \ -storepass android -keypass android

    Here you can find a lot information about this. It's working for me : get Google Maps Api KEy

    EDIT: On Windows using command prompt go to this folder :

    C:\Program Files\Java\jre6\bin

    and type the code above. It should generate you a key which you have to paste here : GET API KEY