Failed to read key androidDebugKey from store <key>: Keystore was tampered with, or password was incorrect

1,104

Silly mistake, I forgot the storePassword property.

Share:
1,104
Apoorv pandey
Author by

Apoorv pandey

Updated on December 20, 2022

Comments

  • Apoorv pandey
    Apoorv pandey over 1 year

    This is a Flutter project.

    I have generated a keystore file using this command:

    keytool -genkey -v -keystore path\signInDebug.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias androidDebugKey

    Then I have placed this key in my app folder android\app in my flutter project.

    I have then added this config in my android/app/build.gradle

    signingConfigs{
            debug{
                keyAlias 'androidDebugKey'
                keyPassword '<password>'
                storeFile file('signInDebug.jks')
            }
        }
        buildTypes {
            debug {
                signingConfig signingConfigs.debug
            }
        }
    

    Now when I try to run my app I'm getting this error:

    A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
       > com.android.ide.common.signing.KeytoolException: Failed to read key androidDebugKey from store "pathToProject\android\app\signInDebug.jks": Keystore was tampered with, or password was incorrect
    
    

    I'm sure that the password and the alias I'm putting is correct. I'm following this tutorial Youtube link