0

Execution failed for task :app:packageRelease

com.android.ide.common.signing.KeytoolException: Failed to read key key0 from store "C:\Users\Karim Bux\Chhotu Ram\Desktop\JKS\hanujks.jks":

Keystore was tampered with, or password was incorrect

I am facing this problem during generating signed apk so guys please guide me step by step what should i do now?

Check My build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "com.hanumanbeniwal.www.hanumanbeniwal"
        minSdkVersion 14
        targetSdkVersion 26
        versionCode 2
        versionName "1.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:design:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
    compile 'com.google.android.gms:play-services-ads:11.0.4'
    testCompile 'junit:junit:4.12'
}
Bit Sikar
  • 1
  • 1
  • 3
  • have a look https://stackoverflow.com/questions/20453249/apk-signing-error-failed-to-read-key-from-keystore – Rumit Patel Feb 09 '18 at 07:41
  • You are entering Key Alias as "key0" which is wrong. Either enter the correct key or create a new key store file and from now on remember the credentials or store them somwhere. – nimi0112 Feb 09 '18 at 07:47
  • nimi0112 I have already published my app on playstore so please suggest what should i do now. – Bit Sikar Feb 09 '18 at 07:56

1 Answers1

1

Check your credentials are right which you are entering. I have faced same issue mine alias is wrong, so check double time. Or generate new .JKS if the app is not at play store.

Piyush
  • 571
  • 3
  • 11
  • Brother app is already published on playstore and downloaded 26,000 times now i want to update my app version but the i am facing that following problem. I am new on android studio so please brother guide me step by step. – Bit Sikar Feb 09 '18 at 07:53
  • then check your keyAlias keyPassword storeFile file storePassword – Piyush Feb 09 '18 at 07:59
  • where to find all these ? – Bit Sikar Feb 09 '18 at 08:00
  • check with that person who has given you Keystore file. The credential must be correct. – Piyush Feb 09 '18 at 08:02
  • @BitSikar Your versionCode is 2. How can it have 26k downloads. – nimi0112 Feb 09 '18 at 10:10
  • @nimi0112 Now i manually changed it to version 2 in my project because i want to update my app on playstore but due to the following error i'm unable to do so. – Bit Sikar Feb 09 '18 at 14:56