由于 Google Play 控制台的 APK 签名过程,无法更新 Unity 游戏

Cannot update Unity game due to APK signing process of Google Play Console

我在 Google Play 上有一个游戏需要更新。游戏是很久以前在 Unity 2017 制作的,当时我不记得有任何应用程序签名过程,或者如果我有我不记得那个文件在哪里。

将 apk 上传到 Google play 时出现错误:

Upload failed
You uploaded an APK that is not signed with the upload certificate. You must use the same certificate. The upload certificate has fingerprint:
[ SHA1: F9:F0... ]
and the certificate used to sign the APK you uploaded have fingerprint:
[ SHA1: 3D:67... ]

我搜索了这个问题并遵循了以下线程并接受了解决方案:https://answers.unity.com/questions/1372982/how-i-can-sign-my-apk-with-an-google-plays-upload.html and Signing an APK with an upload key provided by Google Play

这是我所做的:

.

Keystore type: jks
Keystore provider: SUN

Your keystore contains 2 entries

user, 06-May-2019, PrivateKeyEntry,
Certificate fingerprint (SHA1): FD:A6:5A:...
mykey, 06-May-2019, trustedCertEntry,
Certificate fingerprint (SHA1): F9:F0:89:...

可以看出,该命令将所需的证书密钥添加到我的密钥库中,但它为它创建了一个不同的条目 mykey 并且没有覆盖 user.

现在,当我想统一构建我的 apk 并从 publishing settings 中选择密钥库和密钥时,只有 user 别名显示在那里,并且 apk 是用 user SHA1 而不是必需的 mykey SHA1.

我似乎无法发布这个愚蠢的更新,我浪费了一整天的时间来解决这个问题。任何帮助将不胜感激。

谢谢

如果您使用 Google Play 的应用程序签名并且丢失或泄露了上传密钥,您需要遵循官方 Google instructions:

If you’ve lost your private upload key, or it’s been compromised, you can create a new one, and then ask your account owner to contact support to reset the key. When contacting support, make sure your account owner attaches the upload_certificate.pem file.

After our support team registers the new upload key, you receive an email, and then you can update your keystores and register your key with API providers.

Important: Resetting your upload key doesn’t affect the app signing key that Google Play uses to re-sign APKs before delivering them to users.