GooglePlay - 应用程序包的错误签名密钥 [英] GooglePlay - wrong signing key for app bundle

查看:99
本文介绍了GooglePlay - 应用程序包的错误签名密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用应用程序包.我已在仪表板的 App 签名 部分设置了两个证书(签名证书和上传证书).

I've just now started using app bundles. I've set the two certificates in the App signing section of the dashboard (signing certificate and upload certificate).

我已经构建了一个应用程序包并使用上传证书对其进行签名,但是当我在 Android Instant Apps 下上传该包时(这实际上是我切换到应用程序包的原因)它说那个:

I've built an app bundle and signed it with the upload certificate, but when I upload the bundle under Android Instant Apps (which is in fact the reason I switched to app bundles) it says that:

您的 Android App Bundle 使用错误的密钥签名.确保您的 app bundle 使用正确的签名密钥进行签名,然后重试:xx:xx:xx:xx.....

我已经手动检查了上传密钥库的 SHA-1(在终端中使用 keytool)并且它匹配 xx:xx:xx.... 它在错误消息中说.

I've manually checked the SHA-1 of the upload keystore (using keytool in the terminal) and it matches the xx:xx:xx.... it says in the error message.

我做错了什么?应用程序包已使用所需的上传证书签名,但 google play 似乎不喜欢它.

What am I doing wrong? The app bundle IS signed with the required upload certificate, but google play doesn't seem to like it.

想法?

推荐答案

该解决方案是一个非常基本的解决方案.我必须清理我的项目,然后重新构建它.

The solution was a very basic one. I had to clean my project and then rebuild it.

Android Studio 正在使用我使用的旧证书签署我的应用程序包.

Android Studio was signing my app bundle with the old certificate i was using.

我之前所做的是转到 Build ->生成签名包/APK,我将文件选择器中的 jks 文件更改为新的上传 jks.即使我选择了一个新的,Android Studio 似乎也缓存了旧的证书路径并使用它.可能是 AS 中的错误.

What I did previously is go to Build -> Generate Signed Bundle / APK and i changed the jks file in the file selector to the new upload jks. It seems Android Studio caches the old certificate path and uses it even though I've selected a new one. Might be a bug in AS.

所以是的......现在如果我每次更改 jks 文件时都清理项目,它会使用正确的证书对 apk 或应用程序包进行签名......

So yeah ... now if I clean the project every time i change the jks file it works, the apk or app bundle gets signed with the proper certificate...

这篇关于GooglePlay - 应用程序包的错误签名密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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