“Package not signed correctly” appearing for some users

一世执手 提交于 2019-12-05 04:58:58

The problem is same as you said about jdk7. To overcome that there are lot of discussions over the same topic

Try this by adding

<presetdef name="signjar">
<signjar sigalg="MD5withRSA" digestalg="SHA1" />
</presetdef>

within your build.xml file

Note

The problem is after building a release version with ant release the apk could not be installed on physical device

This only happens with JDK 7 with JDK 1.6.25 all is fine!

It affects only a small percentage because for jarsign jdk7 need SHA1 digest algm, but not with the default algorithms, whatever they are. So device with some other algorithms as default will reject this and cause the problem.

The below are the algorithms used

By default, jarsigner signs a JAR file using one of the following:

DSA (Digital Signature Algorithm) with the SHA1 digest algorithm
RSA algorithm with the SHA256 digest algorithm.
EC (Elliptic Curve) cryptography algorithm with the SHA256 with ECDSA (Elliptic Curve Digital Signature Algorithm).

For more jar signing

Pedro Loureiro

Check this answer:

Published Android apk gives error “Package file was not signed correctly

The problem seems to be related with jdk7 so your fix could solve the problem (but I haven't experienced it myself!)

jagdish

We can signed application using eclipse. Like:- Right-click your project in Eclipse > Chose Android Tool > Export Signed Application Package...

Android Application APK signing?

I hope this may help.Thanks!!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!