android - 生成 APK 时出现“无法恢复密钥”错误
问题描述
生成签名的 APK 时出现以下错误:
Caused by: java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key key0 from store "/Users/zorgan/Desktop/keystore": Cannot recover key
Caused by: java.security.UnrecoverableKeyException: Cannot recover key
at sun.security.provider.KeyProtector.recover(KeyProtector.java:315)
at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:141)
at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:56)
at java.security.KeyStoreSpi.engineGetEntry(KeyStoreSpi.java:473)
at sun.security.provider.KeyStoreDelegator.engineGetEntry(KeyStoreDelegator.java:172)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetEntry(JavaKeyStore.java:70)
at java.security.KeyStore.getEntry(KeyStore.java:1521)
at com.android.ide.common.signing.KeystoreHelper.getCertificateInfo(KeystoreHelper.java:191)
... 32 more
我检查了我的executionHistory.bin
文件并确认 Keystore 密码和 Key 密码都是正确的,并且都是相同的密码:
signingConfig.keyAliasÖkey0ösigningConfig.keyPasswordí**mypassword**úsigningConfig.storePasswordí**mypassword**òsigningConfig
可能是什么问题呢?
解决方案
推荐阅读
- svelte - if there is a way to access to the component's node in the component?
- firebase - Firestore 批量写入回滚?
- javascript - JS - Check if element exist in loop
- java - MongoDb aggregates group Arrays object
- amazon-web-services - 使用 IoT Core 操作时使用 AWS DynamoDB V2 的服务器端时间戳?
- angular - Angular 5 - Api Swagger body responseType blob
- javascript - Javascript:更改输入文件类型?
- java - Thymeleaf:通过索引从数组列表中获取项目
- javascript - Joi - 从数组的第一个元素访问对象项属性
- windows - Mattermost Webhook (Windows):使用 cURL 将表格发送到频道