0

Can anyone please help.

Im following a tutorial from AndroidHive to implement Facebook login into my app. It says to so I download OpenSSL from here which I do.

Then following another tutorial on StackOverFlow (sorry forgot to copy URL) to generate keyhash I...

I then unzip and place the downloaded OpenSSl folder in my C: drive as per this file path (C:\OpenSSL\openssl-0.9.8k_WIN32). Next I copy the path to \bin (C:\OpenSSL\openssl-0.9.8k_WIN32\bin) I then paste this path to my system environment path as per this image.

enter image description here

So my PATH now looks like this in my system environment path C:\PROGRAM FILES\COMMON FILES\ [all other paths specified here] ;C:\OpenSSL\openssl-0.9.8k_WIN32\bin

After my PATH environment variable is set, I open the cmd and type this command: C:>keytool -exportcert -alias androiddebugkey -keystore C:\Users\Hans.android\debug.keystore | openssl sha1 -binary | openssl base64

The path above to my debug.keystore as found in Eclipse can be seen here. enter image description here

When I run the above command though, I get an error saying 'C:\' is not recognizes as an internal or external command, oprable program or batch file. enter image description here

Can anyone please let me know where I am going wrong. I have tried rebooting after adding new PATH which did not work. I have change directories and re-tried the command but all I get is a Access Denied error.

Can anyone please help?

heyred
  • 2,031
  • 8
  • 44
  • 89
  • i've created a tool for that, check this out : http://stackoverflow.com/a/17732453/2226605 up vote my answer if i helped you. – Shahar Apr 30 '14 at 21:49

3 Answers3

1

Don't type the first four characters of the command, C:\> . Just start typing at "keytool".

This is the "prompt" that shows up on each new line before you type a command. When you see instructions on commands to type, you'll often see a prompt like this, just to give context and let you know that what you're looking at is a command. So if a web page says to run

C:\> DIR

That means to go to your command prompt and type just 4 keystrokes: D, I, R, ENTER.

Adam Bliss
  • 645
  • 4
  • 9
1

Remove C:> after C:\Users\Hans> & type entire command & check once again.

Few more things you take care, make sure you are providing proper path for Open SSL & android debug key.

This should solve your problem. Let me know if this does not work for you.

SSD
  • 33
  • 7
0

keytool is the tool which comes with java tool chain, you don't need to install OpenSSL key tool exists in directory C:\Program Files\Java\jdk1.7.0_21\jre\bin (in Windows 8 in my case), you just need to add the path containing keytool in the Path environment variable. After this you will not get error about keytool all other process will go well.

Hope it works

QAMAR
  • 2,684
  • 22
  • 28