问题描述
我刚刚开始使用应用程序捆绑包.我已经在仪表板的App signing
部分中设置了两个证书(签名证书和上传证书).
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:
Your Android App Bundle is signed with the wrong key. Ensure that your app bundle is signed with the correct signing key and try again: 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 -> Generate Signed Bundle / 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-应用捆绑包的错误签名密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!