[ 
https://issues.apache.org/jira/browse/CB-4713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13757993#comment-13757993
 ] 

Braden Shepherdson commented on CB-4713:
----------------------------------------

Is it possible that this is happening when you didn't actually rebuild the APK 
for some reason? Maybe nothing changed so it didn't rebuild, or maybe the 
command failed and you tried to sign the old APK again?

If you delete the old file, cordova build android, and sign it again, does it 
work reliably?
                
> "jarsigner: unable to sign jar" error message
> ---------------------------------------------
>
>                 Key: CB-4713
>                 URL: https://issues.apache.org/jira/browse/CB-4713
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.0.0
>         Environment: Mac OSX
>            Reporter: Steve Husting
>            Assignee: Filip Maj
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> When I'm ready to do a final v1 apk, I run:
> keytool -genkey -v -alias TestApp2 -keyalg RSA -keysize 2048 -validity 10000 
> -keystore TestApp2.keystore
> I copy the TestApp2.keystore file to the TestApp2/platforms/android/bin 
> folder, where my TestApp2-debug.apk was created. 
> When I used jarsigner like so:
> jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore 
> TestApp2.keystore -keypass 6charpassword TestApp2-debug.apk TestApp2
> ... sometimes I get the return from terminal: 
> jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry 
> compressed size (expected 15088 but got 15506 bytes)
> This error comes because it has already been signed. Does this mean that 
> "cordova build android" is automatically applying the .keystore file in the 
> TestApp2/ folder, and we no longer need to do a jarsigner after the 
> first-time keytool has been applied? I thought we would be using jarsigner 
> for each build, each version. 
> Does cordova build android recognize the version number and applies the same 
> keytool to the same version? Not sure what's happening. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to