Android Studio issue missing missing debug.keystore

15,235

Solution 1

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.

Solution 2

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

Share:
15,235
Admin
Author by

Admin

Updated on June 09, 2022

Comments

  • Admin
    Admin about 2 years

    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