title: INSTALL_PARSE_FAILED_NO_CERTIFICATES from adb install; using Java 6, Android 5.0.2
body: <p>I've followed the instructions here and elsewhere on creating a signed jar file and I'm still getting INSTALL_PARSE_FAILED_NO_CERTIFICATES when I try to install the signed .apk onto my LG-D415.
  As noted, the signing algorithm seems to work better with Java 6. So I uninstalled all versions of Java other than that and made sure keytool and jarsigner were using Java 6.</p>
  
  <pre><code>keytool -genkey -v -keystore debug.keystore -alias TabletClient -keyalg RSA -keysize 2048 -validity 20000
  jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore debug.keystore Release\TabletClient.apk TabletClient
  zipalign -v 4 Release\TabletClient.apk Release\TabletClientZ.apk
  adb install Release\TabletClientZ.apk
  </code></pre>
  
  <p>adb logcat shows:</p>
  
  <pre><code>W/PackageManager(  957): android.content.pm.PackageParser$PackageParserException: Failed to collect certificates from /data/app/vmdl272628750.tmp/base.apk
  W/PackageManager(  957):        at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1108)
  W/PackageManager(  957):        at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1035)
  W/PackageManager(  957):        at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:11848)
  W/PackageManager(  957):        at com.android.server.pm.PackageManagerService.access$2500(PackageManagerService.java:273)
  W/PackageManager(  957):        at com.android.server.pm.PackageManagerService$7.run(PackageManagerService.java:9770)
  W/PackageManager(  957):        at android.os.Handler.handleCallback(Handler.java:739)
  W/PackageManager(  957):        at android.os.Handler.dispatchMessage(Handler.java:95)
  W/PackageManager(  957):        at android.os.Looper.loop(Looper.java:135)
  W/PackageManager(  957):        at android.os.HandlerThread.run(HandlerThread.java:61)
  W/PackageManager(  957):        at com.android.server.ServiceThread.run(ServiceThread.java:46)
  W/PackageManager(  957): Caused by: java.lang.SecurityException: Can not recognize a critical extension
  W/PackageManager(  957):        at org.apache.harmony.security.utils.JarUtils.verifySignature(JarUtils.java:120)
  W/PackageManager(  957):        at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:346)
  W/PackageManager(  957):        at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:320)
  W/PackageManager(  957):        at java.util.jar.StrictJarFile.&lt;init&gt;(StrictJarFile.java:68)
  W/PackageManager(  957):        at android.content.pm.PackageParser.collectCertificates(PackageParser.java:1050)
  </code></pre>
  
  <p>Any ideas? Any help will be appreciated.</p>