228

I need to enable google+ api, so I need the debug.keystore. I switched to Android Studio and do not know where it is. I can find it in eclipse at path ~/.android/debug.keystore.

5

21 Answers 21

175

EDIT Step 1) Go to File > Project Structure > select project > go to "signing" and select your default or any keystore you want and fill all the details. In case you are not able to fill the details, hit the green '+' button. I've highlighted in the screenshot.enter image description here

Step 2) VERY IMPORTANT: Goto Build Types> select your build type and select your "Signing Config". In my case, I've to select "config". Check the highlighted region. enter image description here

Sign up to request clarification or add additional context in comments.

15 Comments

I can't see "Facets" written anywhere in Project Structure.
Which Studio are you using? If it is Studio 0.3.2 or above, then I am with you on this one!
I just ran the hello world project once on Android Studio, and it appeared at ~/.android/
@Vera You might want to to mention that the key alias is likely to be 'androiddebugkey' (this is the default), not 'android'.
where can i find the store file :debug.keystore. in my system both eclipse and android studio installed now am work with studio.no one is giving correct process from couple of days am seraching for google places api integration process for development and please any one help me.
|
167
  • For Windows User: C:\Users\USERNAME\.android\debug.keystore (Replace USERNAME with your actual PC user name)

  • For Linux or Mac OS User: ~/.android/debug.keystore

After you will get SHA1 by below Code using Command Prompt:

 keytool -list -v -keystore "C:\Users\USERNAME\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android 

1 Comment

You can also specify the path like this "$HOME\.android\debug.keystore"
74

In Android Studio you can find all your app signing information without any console command:

  1. Open your project

  2. Click on Gradle from right side panel

  3. In Gradle projects panel open folders: Your Project -> Tasks-> Android

  4. Run signingReport task (double click) and you will see the result in Gradle console (keystore paths,SHA1,MD5 and so on).

signingReport task and its result

4 Comments

i am looking for release key store. Variant: release, config: none. but I already set up release key. please help.
Thx alexshr. I was having logging in issues using Google Drive API and it turned out to be a signing issue solved by combining your answer here and that of Prachi above.
+1 Apart from generating SHA1 etc. it also tells the path/location of debug keystore being used for that project.
this is the best! accepted answer does not work when default values are used (i.e. debug keystore was not specified in my case). turned out .android folder in my android SDK was being used..
65

You can use this command and will fetch all your key-stores, go to your terminal and in your android root directory run this:

./gradlew signingReport 

it will give you something like this a list of key-store and their information:

enter image description here

Comments

60

Another way of finding out your key information is to go to your java folder, for me it was at

C:\Program Files\Java\jdk1.8.0_60\bin 

and run the following command

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

from the command you can easily see that keystore address is "c:\users/<%mylogin%>.android\debug.keystore" , alias is "androiddebugkey" store password is "android" key password is "android"

This is the default configuration from the Android 'Get API Key' documentation. https://developers.google.com/maps/documentation/android-api/signup

1 Comment

If you are using a new version of Android Studio(my version is 2.2.2), you can find keytool in "C:\Program Files\Android\Android Studio\jre\bin".
28

I got this problem. The debug.keystore file was missing. So the only step that created a correct file for me was creating a new Android project in Android Studio.

It created me a new debug.keystore under path C:\Users\username\.android\.

This solution probably works only when you have not created any projects yet.

2 Comments

I accidently deleted my debug.keystore file. This post helped me to regenerate that file.
This is what I was looking for. I am surprised Android Studio does not create one when it's installed....
27

It helped me.

Keystore name: "debug.keystore"
Keystore password: "android"
Key alias: "androiddebugkey"
Key password: "android"

exapmle

USER_NAME_PC - Your PC username

1 Comment

Caution to reader: The text for Key alias is correct (androiddebugkey) but the screenshot is wrong.
7

If you find that you do not have JDK installed. Go to your android terminal and navigate to the bin folder of JRE that comes with Android Studio.

C:\Program Files\Android\Android Studio\jre\bin 

and run the following command. Remember to replace USERNAME with your actual PC username.

keytool -list -v -keystore "C:\Users\USERNAME\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android 

Comments

4

From the Android Developers documentation about Signing your app :

Expiry of the debug certificate

[...] The file is stored in the following locations:

  • ~/.android/ on OS X and Linux
  • C:\Documents and Settings\<user>\.android\ on Windows XP
  • C:\Users\<user>\.android\ on Windows Vista and Windows 7, 8, and 10

Comments

2

On Windows,

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\.android/debug.keystore -list -v where C:\Users\GB\.android/debug.keystore is path to keystore in my case.

You will get results like this.

enter image description here

Comments

2

In my case, Android Studio's SDK was installed in this location:

E:\Android\AppData\Local\Sdk

And my .android file was in:

%UserProfile%\.android

To set up the environment variables correctly, follow these steps:

  1. Remove the ANDROID_HOME or ANDROID_SDK_HOME variable from the environment variables.
  2. Create a new variable with the name ANDROID_HOME and the value of your SDK location (e.g., E:\Android\AppData\Local\Sdk).
  3. Create a new variable with the name ANDROID_USER_HOME and the value of the directory where your .android file is located (e.g., %UserProfile%\.android).
  4. Restart Android Studio.

Comments

1

On Windows, if the debug.keystore file is not in the location (C:\Users\username\.android), the debug.keystore file may also be found in the location where you have installed Android Studio.

1 Comment

The only right answer for someone who installed android studio outsude C drive
1

The default keystore file: debug.keystore is present in the folder .android which is usually located in the default home folder of your operating system of the user who installed that Android SDK.

In my Ubuntu PC, it's location is /home/dhananjay/.android

Whereas in the Windows PC it is located at C:\Users\dhananjay\.android

Comments

1

=======================================

in standart File Explorer:

=======================================

in standart File Explorer:

=======================================

open View tab and check Hidden items :

=======================================

open view tab and check Hidden

=======================================

Now you can see your .android folder

=======================================

Now you can see your .android folder

Comments

1

[SOLVED] How I made my app run again after I had changed my username on same Windows 10 machine

In Android Studio, File > Project Structure > app > clicked “+” to add new configuration "config" File > Project Structure > app > Signing

In Flavors tab > Signing box, chose new "config" entry File > Project Structure > app > Flavors

This reconfigured the app. Closed & restarted Studio

Clicked Build > Rebuild Project

The app added and showed this automatically: build.gradle

When I tested the app on a cell phone, Studio asked to reinstall the app with this new configuration. App runs as before!

DynaMike

Comments

1

Sometimes it is specified in the app/build.gradle file. For example:

signingConfigs { debug { storeFile file(System.env.HOME + '/.android/debug.keystore') storePassword 'android' keyAlias 'androiddebugkey' keyPassword 'android' } } 

Comments

0

The easiest thing I can think of is to grab the fingerprint from the debug.keystore (paths are mentioned in other answers) and add that to your project. No need to copy keystores or add new apps. Just append to the list of fingerprints for each machine you develop on.

FWIW, I ran into this when I switched from one laptop to another. I bounce around a lot.

https://support.google.com/firebase/answer/7000104?hl=en#sha1

Hope that helps some folks out! :)

Comments

0

Go to Build > Clean Project

Build your project again.

Comments

0

In the case of Flutter you have to open the android part of the project only File->open->select the android folder of that project wait few minutes to complete the gradle sync after that on the right side click on the gradle->android->Tasks->android->signin Report

Comments

0

I needed the debug.keystore after I had just installed Android Studio, and it was not in the .android folder.

My solution was to create a new empty project, Build->Select Build Varient... then under Active Build Varient I set it to debug. I then built the project, and I even ran debug on it too (not sure if nessisary). After this I checked in the .android folder, and debug.keystore was generated.

Comments

-2

try to sync the gradle before . the complete the steps in tasks ...

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.