美文网首页
Android签名app,SHA256withRSA问题

Android签名app,SHA256withRSA问题

作者: 一叶知秋yi | 来源:发表于2018-07-13 08:47 被阅读114次

在对app进行签名,然后上传到某应用市场时,有如下报错


错误提示

签名方式如下

jarsigner -verbose -keystore xxx.keystore -signedjar signed.apk unsigned.apk yyy.keystore

原来是jarsigner默认采用了SHA256withRSA的签名算法,导致在部分4.2以下的Android手机上不能安装。那么只需要指定签名算法即可。重新签名,指令如下

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore xxx.keystore -signedjar signed.apk unsigned.apk yyy.keystore

记录一下自己踩的坑,也希望能帮到碰到同样问题的人。

相关文章

网友评论

      本文标题:Android签名app,SHA256withRSA问题

      本文链接:https://www.haomeiwen.com/subject/znndpftx.html