Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio issue missing missing debug.keystore

Every time I want to sign my aok I get the failure Missing debug.keystore it says that it actually should me located under this path Store: C:\Users\jamie\.android\debug.keystore but there isn't any keystore file.

How can I create one ?

Please explain it for a really silly person.

Android Studio Messages Gradle Build

enter image description here

File Manager

enter image description here

like image 929
KingMarshmellow Avatar asked Apr 28 '16 15:04

KingMarshmellow


People also ask

Where is the Android debug keystore?

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.


2 Answers

I know this comes late but I hope it helps those that come in the future. To generate a new keystore do the following:

  1. Type keytool -alias "AndroidDebugKey" -genkeypair in the terminal of your android studio give it a password of android.

  2. The rest of the fields or questions asked after that don't matter so just press Enter.

  3. Go to your home directory (C:\Users<YOUR USERNAME>) and look for a file named as .keystore.

  4. Rename .keystore to debug.keystore.

  5. Now copy and paste it to (C:\Users<YOUR USERNAME>.android).

  6. Re-run the signReport task to generate a new key for APP.

like image 142
Kasasira Avatar answered Sep 22 '22 22:09

Kasasira


You can generate a keystore using the keytool. It should be included in your JDK -

-genkeypair {-alias alias} {-keyalg keyalg} {-keysize keysize} 
{-sigalg sigalg} [-dname dname] [-keypass keypass] {-validity valDays} 
{-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerClass provider_class_name {-providerArg provider_arg}} 
{-v} {-protected} {-Jjavaoption}

Key Tool Tutorial

You can set the location of your keystore in the gradle file. For example -

...
android {
    ...
    defaultConfig { ... }
    signingConfigs {
        release {
            storeFile file("myreleasekey.keystore")
            storePassword "password"
            keyAlias "MyReleaseKey"
            keyPassword "password"
        }
    }
    buildTypes {
        release {
            ...
            signingConfig signingConfigs.release
        }
    }
}
...

Signing Applications

like image 35
a_m Avatar answered Sep 26 '22 22:09

a_m