Signingconfig "Release" Is Missing Required Property "Keypassword"

The error complains that I have not set the signingConfig.release.keyPassword, however I am setting it.

I already tried hardcoding the password instead retrieving it from the key.properties file however that didn't help.

// build.gradle file  

// ... the rest of the build code

android {        

    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile file(keystoreProperties['storeFile'])
            storePassword keystoreProperties['storePassword']
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }
} 

10 Answers

try this: In build.gradle(Module: app)

// ... the rest of the build code

android {

    signingConfigs {
        release {
            storeFile file('your_key_store_path')
            storePassword 'your_store_password'
            keyAlias = 'your_key_alias'
            keyPassword 'your_key_password'
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }
}

Also you can create Signing Configs in Android Studio:
File > Project Structure > Select Modules > Select Signing Configs. In Signing Configs, there is debug config is already created but you can create a new one by pressing the + icon.

2

In my case I used a new computer and the

[project]/android/key.properties

file was missing, because I added it to .gitignore and therefore it was not in the repository. It has this form:

1

Create a file named [project]/android/key.properties, that contains a reference to your keystore. Don’t include the angle brackets (< >). They indicate that the text serves as a placeholder for your values.

storePassword=<password-from-previous-step>
keyPassword=<password-from-previous-step>
keyAlias=upload
storeFile=<keystore-file-location>

Source:

I had a similar issue (in my case, the error was: SigningConfig "release" is missing required property "storeFile") but the root cause was the same: I was missing the

[project]/android/key.properties

file, as pointed out by Rahul Kushwaha (Thank a lot, sir!)

What I want to share is a heads up: if you store confidential info (such as passwords) in the build.gradle, file you should add it to .gitignore, but I don´t think that´s a great idea. Therefore, as Rahul suggests, check if key.properties is missing or in the wrong location.

I had a similar issue (in my case, the error was: SigningConfig "release" is missing required property "storeFile") so I resolved this by making sure below things

App-level build

build.gradle

release {
        if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
            storeFile file(MYAPP_UPLOAD_STORE_FILE)
            storePassword MYAPP_UPLOAD_STORE_PASSWORD
            keyAlias MYAPP_UPLOAD_KEY_ALIAS
            keyPassword MYAPP_UPLOAD_KEY_PASSWORD
        }
    }

The above property(for example MYAPP_UPLOAD_STORE_FILE) matches with the below property in this file gradle.properties

In android folder

gradle.properties

MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore

make sure both keys are should be matched if they mismatch then the error should be prompted

Check if the Key.properties file is present or not .I have pull the repo from github and this project have no key.properties file . This is the main reason for this. Now I created a new file key.properties and it started working.

storePassword=12345
keyPassword=12345
keyAlias=upload
storeFile=/Users/rahulkushwaha/Desktop/pppp/upload-keystore.jks

In window try to write path as

C:\\Users\\<Your user folder>\\upload-keystore.jks

The important note is "\" in a path.

If you've tried every solution and you have your files where they are supposed to be, check and make sure your key.properties file is:

key.propterties

and not:

key.properties.txt

I have faced the same issue. If you want to run the application and yet you're getting the issue, try to change the build types from left-down corner which is called "Build Variants". Just simply change the release option to debug on the "Active Build Variant" column.enter image description here

It worked for me. If you are getting the same problem go Build from the main ribbon and click on Generate Singed Bundle/APK and write the keyPassword and confirm the Remember passwords checkbox.

This is what worked for me. I changed 'key.properties' to 'app/key.properties' in my "android/app/build.gradle" file.

This was the old code

def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties')

This is the new code

def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('app/key.properties')

Your Answer

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

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest