FabianCook
FabianCook

Reputation: 20557

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

Upvotes: 4

Views: 11997

Answers (6)

Ansh Goel
Ansh Goel

Reputation: 1

This is what worked for me, without working in jre bin folder:

keytool -list -v -alias androiddebugkey -keystore .android/debug.keystore

Upvotes: 0

JOHN BAPTIST
JOHN BAPTIST

Reputation: 1

This is what worked for me.

Run this code in command prompt (Replace <enterYourPcUsername> with your PC name)

keytool -v -list -alias androiddebugkey  -keystore c:\Users\<enterYourPcUsername>\.android\debug.keystore  -storepass android -keypass android

Upvotes: 0

Brainwash
Brainwash

Reputation: 328

here is what worked for me, my command prompt at jre bin folder :

c:\Program Files\Java\jre1.8.0_144\bin>keytool.exe -v -list -alias androiddebugkey  -keystore c:\Users\<UserDirectory>\.android\debug.keystore  -storepass android -keypass android

Upvotes: 0

Akshay Purey
Akshay Purey

Reputation: 61

Try giving keytool path from gre. It worked for me.

C:\Program Files\Java\Jre7\bin>keytool -list -alias androiddebugkey -keystore
 "C:\Uers\Akki\.android\debug.keystore" -storepass android -keypass android

If you have installed Jdk 1.7 it will generate SHA1 key which will not work for that use -v

C:\Program Files\Java\Jre7\bin>keytool -v -list -alias androiddebugkey -keystore "C:\Uers\Akki.android\debug.keystore" -storepass android -keypass android

Upvotes: 6

Android-Droid
Android-Droid

Reputation: 14565

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

Upvotes: 3

Samir Mangroliya
Samir Mangroliya

Reputation: 40406

my debug keystore so I can get a key for a map view

First of all is it (C:\Users\MyPcName.android\debug.keystore) your app keystore?

And check your keytool path.

keytool -v -list -alias YOURAPPaliasName -keystore "here your keystore path" 

Upvotes: 1

Related Questions