Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
470 views
in Technique[技术] by (71.8m points)

java - 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:UsersLancelotDesktop elease.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:UsersLancelotDesktop elease.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??

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I had a similar problem while updating my app. The keytool was not reading the correct keystore file and instead pointing to an older keystore file that I created months ago and not used. Searched for some solutions online but didn't find one. Almost gave up but I thought about cleaning the project by clicking Build then Clean Project. This last resort worked for me.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...