Android Studio - Keystore被篡改,或密码不正确 [英] Android Studio - Keystore was tampered with, or password was incorrect

查看:1654
本文介绍了Android Studio - Keystore被篡改,或密码不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Android Studio v1.4中的内置窗口小部件生成已签名的APK。

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


错误:任务':app:packageRelease'的执行失败。
无法从商店C:\ Users \Lancelot \Desktop \ release.jks中读取密钥cckey:密钥库被篡改,或密码错误

Error:Execution failed for task ':app:packageRelease'. Failed to read key cckey from store "C:\Users\Lancelot\Desktop\release.jks": Keystore was tampered with, or password was incorrect

我能够检索我的密钥别名,如下面的截图

I was able to retrieve my key alias like the below screenshot

(为了到达这里,密钥库密码必须正确;否则它将显示错误)

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

然后我输入我的密钥密码但是没有好运签署APK ...
我甚至尝试使用命令行更改密钥密码 keytool -keypasswd -alias cckey -keystore C:\ Users \Lancelot \Desktop \\ \\release.jks 。通过运行这个我需要在输入新密码之前正确输入旧密码,这一切都经过了;这证明密钥密码首先没有错。

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:\Users\Lancelot\Desktop\release.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??

推荐答案

显然我刚发现另一个发布几个月前发布,解决了我的问题,我挣扎了好几天...

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!

这篇关于Android Studio - Keystore被篡改,或密码不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆