Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android. Firebase: Keystore file does not exist: ~/.android/debug.keystore

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?

like image 945
user8542613 Avatar asked Sep 20 '17 07:09

user8542613


People also ask

Where is the Android debug keystore?

The default location is /Users/<username>/. android/debug. keystore.

How do I debug a keystore?

All you need to do is goto command prompt and cd C:\Program Files\Java\jdk-10.0. 2\bin> where jdk-10.0. 2 or full path can be different in your case. once you are in the bin, enter this code keytool -keystore C:\Users\GB\.

What is debug keystore password?

A debug keystore which is used to sign an Android app during development needs a specific alias and password combination as dictated by Google. To create a debug keystore, use: $ keytool -genkey -v -keystore debug.


2 Answers

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.

like image 113
Niraj Niroula Avatar answered Nov 14 '22 23:11

Niraj Niroula


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

like image 26
MNFS Avatar answered Nov 15 '22 00:11

MNFS