6

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

3 Answers 3

23

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 and 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\) 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.

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

3 Comments

Am glad you liked it
what about linux?
this is the only thing that worked for me! thanks so much
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

Comments

0

If anyone is still suffering with this in 2024 and on ubuntu 22+, All I had to do was to install the openjdk-17-jre-headless

sudo apt install openjdk-17-jre-headless

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.