0

I try to get SHA1 to use for Firebase but I can't get SHA1

In JavaVirtualMachines I using jdk1.8.0_202.jdk

  1. I tried get in gradle -> Task -> Android -> signingReport

=> Error: Missing keystore

  1. I tried get on command line ->

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

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

=> Error:

keytool error: java.lang.Exception: Keystore file does not exist: /Users/bobhope/.android/debug.keystore
java.lang.Exception: Keystore file does not exist: /Users/bobhope/.android/debug.keystore
    at sun.security.tools.keytool.Main.doCommands(Main.java:786)
    at sun.security.tools.keytool.Main.run(Main.java:382)
    at sun.security.tools.keytool.Main.main(Main.java:375)
Bob Lee
  • 279
  • 4
  • 13

3 Answers3

2

Use complete path

Mac:

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

Linux:

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

Windows:

keytool -list -v -keystore C:\Users\username\.android\debug.keystore
-alias androiddebugkey -storepass android -keypass android
Anand
  • 4,355
  • 2
  • 35
  • 45
0

you missed the path in your command

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

after the keystore you should add the path like C:\Users\Username\Downloads

0

Try these steps:

  1. Clean and rebuild your application.
  2. Open the Gradle tab and go to app -> Tasks -> android
  3. Double click on signingReport.

enter image description here

  1. You will get the required signing report below in the run tab.

enter image description here

Sweta Jain
  • 3,248
  • 6
  • 30
  • 50