1
keytool -exportcert -list -v \
-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore

This is the instructions from Google "Firebase in a weekend". However this is not working. I have tried to add my JRE to the path variable and have done ample research but I keep getting this error...

C:\>-alias androiddebugkey -keystore %CONNERGESBOCKER%\.android\debug.keystore
'-alias' is not recognized as an internal or external command,
operable program or batch file.

thanks!

Conner Gesbocker
  • 384
  • 3
  • 12

3 Answers3

4

It's splitting it into two lines incorrectly.

Change the command to be a single line:

keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
Ken Wolf
  • 23,133
  • 6
  • 63
  • 84
  • 1
    As a side note, to run it as 2 lines use the caret key (^) https://stackoverflow.com/a/69079/833647 – Ken Wolf Jun 14 '17 at 15:28
0

I found a easy way to get SHA-1

go to Gradle menu on right side of screen then Task->android->SigningReport . double click it. after its complete you will see SHA-1 in the "Run" menu at botton(Scroll up to see it).

Adithya
  • 1,688
  • 1
  • 10
  • 18
0

If you are using android studio use simple step

  1. Run your project
  2. Click on Gradle menu
  3. Expand Gradle task tree
  4. Click on android-> signingReport and see the magic
  5. It will tell you everything
Aqsa Shahid
  • 64
  • 1
  • 9