从命令行签名Android App Bundle [英] Sign Android App Bundle from Command Line

查看:1251
本文介绍了从命令行签名Android App Bundle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何从命令行使用新的密钥库对.aab文件进行签名吗?
文档此处提到我们可以使用jarsigner对我们的应用进行签名从命令行捆绑。但是我找不到命令行?
任何人都知道命令行吗?

anyone know how to sign .aab file using new keystore from command line? The documentation here mentions that we can use jarsigner to sign our app bundle from the command line. but I cannot find the command line? Anyone know the command line?

将捆绑包上传到Google Play时出现此错误:

I got this error when uploaded my bundle to Google Play:

You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner:

我尝试使用以下命令对应用程序包进行签名:

I try to sign the app bundle using this command:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore xample.jks bundle.aab keystoreAlias

非常感谢。

推荐答案

可能您已经找到了解决问题的方法。不过,由于它可能会在将来对某人有所帮助,所以我只是想说我遇到了同样的问题,将哈希算法更改为 SHA-256 可以帮助我克服它。

Probably you've already found a way to solve your problem. Nevertheless, since it may help someone in the future, I just wanted to say that I had the same problem and changing the hashing algorithm to SHA-256 helped me to overcome it.

jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore xample.jks bundle.aab keystoreAlias

这篇关于从命令行签名Android App Bundle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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