【问题标题】:Upload fail with APK with 2 certificates entries that are valid带有 2 个有效证书条目的 APK 上传失败
【发布时间】:2023-11-10 23:41:01
【问题描述】:

我正在尝试在 Google Developer 中更新我的应用,但收到错误消息:

>Upload failed
>
>You uploaded an APK that is signed with a different certificate to your >previous APKs. You must use the same certificate. Your existing APKs are >signed with the certificate(s) with fingerprint(s):
>
>[ SHA1: AF:AF:68:1E:2B:5C:99:23:4D:B9:87:F6:D6:2F:9D:5A:9A:BE:34:EC ]
>
>and the certificate(s) used to sign the APK you uploaded have >fingerprint(s):
>
>[ SHA1:2A:84:1D:BC:91:68:55:B1:F3:90:47:FB:3B:56:29:21:F2:38:4A:37 ]

但是,使用 keytool,keystore 文件包含 2 个条目,这两个都是这些证书。

我如何让开发人员排除密钥库中的有效条目?

【问题讨论】:

    标签: apk keystore android-keystore


    【解决方案1】:

    我发现了解决方案。我有两个条目,因为有时我拼错了我的别名,它在密钥库文件中生成了一个新条目。

    我使用 keytool 实用程序列出了密钥库的内容并删除了错误的别名。

    keytool -list -v -keystore -- 列出内容 keytool -delete -alias "" -keystore

    【讨论】: