0

I followed Steps to create Hash Key.

  1. Downloaded openssl

  2. Unzipped and copied all the files in the bin folder including openssl.exe

  3. Pasted all the files copied from Openssl’s bin folder to the Jdk bin folder.

  4. Then i used following command on openssl.exe terminal window

    keytool -exportcert -alias androiddebugkey -keystore C:\Users\Joelle.android\debug.keystore | openssl sha1 -binary | openssl enc -a -e

but it is throwing following error

openssl error :'keytool is invalid command'

Please guide me ...

thanx

hangman
  • 865
  • 5
  • 20
  • 31
  • you have to set your jre->bin file to your system variable path.. then you can call keytool comand from everywhere.. – Cata Jun 22 '12 at 05:54

3 Answers3

5

Keytool is usually found in JRE bin folder in my case it is present in

C:\Program Files\Java\jre6\bin

So you should write

cd C:\Program Files\Java\jre6\bin

then

keytool -exportcert -alias androiddebugkey -keystore C:\Users\Joelle.android\debug.keystore | openssl sha1 -binary | openssl enc -a -e

There is nice tool present

try to generate Key Hash with this tool http://www.easyfacebookandroidsdk.com/download/keyhash.zip

Vipul
  • 27,808
  • 7
  • 60
  • 75
  • so using this method will work for debugging but when deploying the app I should replace the debug.keystore line with my app release keystore to actually work in production? – Jake Dec 14 '13 at 17:47
1

Try using

keytool -exportcert -alias androiddebugkey -keystore C:\Users\Joelle.android\debug.keystore | openssl sha1 -binary | openssl base64
Ankit
  • 900
  • 7
  • 9
0

Instead of just writing keytool, you must specify full path of it, i.e. In my case the path is:

C:\Program Files (x86)\Java\jre6\bin\keytool.exe
Rustam Gasanov
  • 15,290
  • 8
  • 59
  • 72
Maulik J
  • 2,745
  • 19
  • 22