7

Windows 10

Firebase I want to create Firebase project. So I use this official documentaion: Manually add Firebase

Steps:

  1. Go to Firebase consle
  2. Click create new project
  3. Create new applications
  4. Select Android
  5. Input name: com.myproject
  6. I need to input debug signing certificate SHA-1:

Here screen: Debug signing cert SHA-1

So I open shell and input:

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

But I get error:

keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
keytool error: java.lang.Exception: Keystore file does not exist: ~/.android/debug.keystore
java.lang.Exception: Keystore file does not exist: ~/.android/debug.keystore
    at sun.security.tools.keytool.Main.doCommands(Main.java:745)
    at sun.security.tools.keytool.Main.run(Main.java:343)
at sun.security.tools.keytool.Main.main(Main.java:336)

What is wrong? In my home folder no file "debug.keystore". So how I can get hash?

user8542613
  • 655
  • 2
  • 12
  • 23

3 Answers3

13

Android Studio will do the SHA key generating part to save your time and effort. You've to find Gradle Project tab somewhere at the right edge of your Android studio. Open it up.

enter image description here

Under your project(root)>Tasks>android, find something called signingReport and run it by double clicking on it.

enter image description here

You will find your SHA1 and MD5 certificates in the Run section, below.

enter image description here

Copy the SHA1 and use it. Otherwise, debug signing certificate SHA-1 is optional in this case, so you can continue without this.

Niraj Niroula
  • 2,150
  • 1
  • 13
  • 33
  • 2
    ..if you still don't see it, after running signingReport .. click "Gradle Console" on the lower right side – codemode Oct 04 '17 at 18:24
  • 1
    If you do not see it, On the console window , click the 'Toggle tasks executions/text mode' icon in the left top corner of it – BRDroid Feb 21 '18 at 14:49
2

maybe you can try this, go to the right side of your android studio and then double click the signingReport

gradle
and you will find the SHA-1 here,
sha1
hope this help your problem

MNFS
  • 175
  • 3
  • 16
-1

Have you tried out this guide as suggested in this solution?

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

Edited: A rather extensive guide on the same topic have been made here. I've personally succeeded with this on Win10 in Android Studio.