Skip to content
Advertisement

Android Studio – Keystore was tampered with, or password was incorrect

I am trying to generate a signed APK by using the built-in widget in Android Studio v1.4.

However, I got this annoying error

Error:Execution failed for task ‘:app:packageRelease’. Failed to read key cckey from store “C:UsersLancelotDesktoprelease.jks”: Keystore was tampered with, or password was incorrect

I was able to retrieve my key alias like the below screenshot enter image description here

(In order to get to here, the key store password must be correct; otherwise it’ll show error)

Then I typed in my key password but no luck on signing the APK… I even tried changing the key password using the command line keytool -keypasswd -alias cckey -keystore C:UsersLancelotDesktoprelease.jks. By running this I need to enter old password correctly before entering new password, which all went through; this proves that key password wasn’t wrong at the first place.

So question is, if my key store password, key alias, and key password are all correct, what’s wrong with it then??

Advertisement

Answer

Apparently I just found another post posted few months ago that solved my issues I struggled for days…

Simply need to change the keystore and key alias password to be the same for it to work. Though I still don’t know why the same keystore worked before when I was publishing updates; then not working anymore until I changed the passwords.

If anyone has answer for that, please let everyone know!

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement