安卓工作室构建已签名的 APK获取密钥失败

问题描述

我几个月来一直在构建我的应用的发布版本,现在突然出现这个错误
Failed to read key ******** from store ***** Get Key Failed. Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
这太令人沮丧了。

到目前为止我做了什么

  1. 阅读有关此错误的所有帖子并尝试各种解决方
  2. 验证我的密码正确
  3. 选中和取消选中“保存密码”
  4. 验证我的密钥库位置是否正确

解决方法

如果您在签署 App Bundle 或 APK 时遇到 block not properly paddedbad keyPKCS12 之类的错误,请尝试对密钥和密钥库文件使用相同的密码,它对我有用.