Programming Tips - When I upgraded to JDK7 my apk won't install. It gives this "Invalid digest for some file"...

Date: 2013nov5 OS: Android Language: Java Q. When I upgraded to JDK7 my apk won't install. It gives this "Invalid digest for <some file>"...
I/ActivityManager( 113): START {dat=file:///mnt/sdcard/<myapp>.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras)} from pid <pid> D/PowerManagerService( 113): $$ acquireWakeLock flags=0x1 tag=ActivityManager-Launch W/InstallAppProgress( 698): Replacing package:<my package> W/ActivityManager( 113): No content provider found for permission revoke: file:///mnt/sdcard/<myapp>.apk W/ActivityManager( 113): No content provider found for permission revoke: file:///mnt/sdcard/<myapp>.apk W/PackageParser( 113): Exception reading <first file> in /data/app/vmdl-<number>.tmp W/PackageParser( 113): java.lang.SecurityException: META-INF/<mykey>.SF has invalid digest for <some file> in /data/app/vmdl-<number>.tmp W/PackageParser( 113): at java.util.jar.JarVerifier.invalidDigest(JarVerifier.java:131) W/PackageParser( 113): at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:350) W/PackageParser( 113): at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:258) W/PackageParser( 113): at java.util.jar.JarFile.getInputStream(JarFile.java:378) W/PackageParser( 113): at android.content.pm.PackageParser.loadCertificates(PackageParser.java:362) W/PackageParser( 113): at android.content.pm.PackageParser.collectCertificates(PackageParser.java:550) W/PackageParser( 113): at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:6627) W/PackageParser( 113): at com.android.server.pm.PackageManagerService.access$1500(PackageManagerService.java:152) W/PackageParser( 113): at com.android.server.pm.PackageManagerService$5.run(PackageManagerService.java:5164) W/PackageParser( 113): at android.os.Handler.handleCallback(Handler.java:605) W/PackageParser( 113): at android.os.Handler.dispatchMessage(Handler.java:92) W/PackageParser( 113): at android.os.Looper.loop(Looper.java:137) W/PackageParser( 113): at android.os.HandlerThread.run(HandlerThread.java:60) D/dalvikvm( 113): GC_CONCURRENT freed 441K, 7% free 9047K/9671K, paused 0ms+4ms E/PackageParser( 113): Package <my package> has no certificates at entry <first file>; ignoring!
A. You need to add options -digestalg SHA1 -sigalg MD5withRSA to jarsigner in JDK7.