|Problems when signing APKs with Java 7.||BoD||11/16/11 10:20 AM|
I just spent a few hours on a signature problem when building our project with ant on a machine that has (Oracle's) Java 7 installed.
When trying to install this apk, I have this error:
After looking inside the MANIFEST.MF file inside the apk, I noticed that the digests are in the form:
Whereas when building with Java 6, they have the form:
I then saw in the (Java 7) jarsign documentation the -digestalg options (http://download.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html).
When signing manually the apk with jarsign (instead of using the ant build), and passing -digestalg SHA1, I no longer have the problem.
I was wondering if this was a known issue, and if yes, is there anyway to fix it in an 'ant friendly' way?
Thanks a lot!
|Re: [android-developers] Problems when signing APKs with Java 7.||Nikolay Elenkov||11/16/11 6:27 PM|
Java 7 is not officially supported, AFAIK. People on SO have been reporting
SHA256 is the new default in Java 7 jarsigner, so you need to specify the
|Re: [android-developers] Problems when signing APKs with Java 7.||BoD||11/17/11 12:37 AM|
Thanks for your answer.
I guess I was unlucky with my search terms because I did spent time a few hours googleing but did not find anything. If you have the SO links I'd appreciate it :)
Also if anybody from the Android tools team reads this, it would be a good idea to put a warning about this on the page http://developer.android.com/guide/publishing/app-signing.html
|Re: [android-developers] Problems when signing APKs with Java 7.||Nikolay Elenkov||11/17/11 1:37 AM|
On Thu, Nov 17, 2011 at 5:37 PM, BoD <bodl...@gmail.com> wrote:
|Re: Problems when signing APKs with Java 7.||gjs||11/17/11 8:20 PM|
Yes I can confirm the same problems happen with jarsigner & jdk 1.7
On Nov 17, 8:37 pm, Nikolay Elenkov <nikolay.elen...@gmail.com> wrote:
|Re: [android-developers] Re: Problems when signing APKs with Java 7.||Nikolay Elenkov||11/17/11 8:27 PM|
On Fri, Nov 18, 2011 at 1:20 PM, gjs <garyjam...@gmail.com> wrote:
Here's the related ADT issue:
|Re: [android-developers] Re: Problems when signing APKs with Java 7.||BoD||11/18/11 12:37 AM|
Thanks a lot for the link.
|Re: Problems when signing APKs with Java 7.||joebowbeer||12/16/11 12:41 PM|
Here is a bug report and patch to Ant's signjar task:
More related discussion and proposed workarounds at:
On Nov 17, 8:27 pm, Nikolay Elenkov <nikolay.elen...@gmail.com> wrote: