Abduhafiz
Abduhafiz

Reputation: 3404

Execution failed for task ':app:packageDebug'

I'm getting this error when running (Shift+F10) a project in Android Studio.

Error:Execution failed for task ':app:packageDebug'.

Failed to read key key_name from store "/home/hello/AndroidStudioProjects/project/extras/keystorefile.jks": Keystore was tampered with, or password was incorrect

But it generates release .apk file without a problem.

Upvotes: 0

Views: 3039

Answers (1)

Ramkesh Yadav
Ramkesh Yadav

Reputation: 1087

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}

signingConfigs {
    releaseConfig {
        storeFile file("keystore.jks")
        storePassword "**"
        keyAlias "key name is here"
        keyPassword "**"
    }

Note :use this lines in app.gradle. make sure the line should be start from "releaseConfig" should not "debug" on " signingConfigs".and its working.

Upvotes: 1

Related Questions