Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Found it! I was having this problem with 'ant' and it was due to this CAUTION mentioned in the documentation:</p> <blockquote> <p><a href="http://developer.android.com/guide/publishing/app-signing.html#signapp" rel="nofollow noreferrer">http://developer.android.com/guide/publishing/app-signing.html#signapp</a></p> <p>Caution: As of JDK 7, the default signing algorithim has changed, requiring you to specify the signature and digest algorithims (-sigalg and -digestalg) when you sign an APK.</p> </blockquote> <p>I have JDK 7. I can't speak for your OpenJDK IcedTea, but it is probably the same issue. Your Maven log didn't give enough details. In my Ant log, I used -v for verbose and it showed</p> <pre><code>$ ant -Dadb.device.arg=-d -v release install [signjar] Executing 'C:\Program Files\Java\jdk1.7.0_03\bin\jarsigner.exe' with arguments: [signjar] '-keystore' [signjar] 'C:\cygwin\home\Chloe\pairfinder\release.keystore' [signjar] '-signedjar' [signjar] 'C:\cygwin\home\Chloe\pairfinder\bin\PairFinder-release-unaligned.apk' [signjar] 'C:\cygwin\home\Chloe\pairfinder\bin\PairFinder-release-unsigned.apk' [signjar] 'mykey' [exec] pkg: /data/local/tmp/PairFinder-release.apk [exec] Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES] </code></pre> <p>I signed the JAR manually and zipaligned it, but it gave a slightly different error:</p> <pre><code>$ "$JAVA_HOME"/bin/jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore release.keystore -signedjar bin/PairFinder-release-unaligned.apk bin/PairFinder-release-unsigned.apk mykey $ zipalign -v -f 4 bin/PairFinder-release-unaligned.apk bin/PairFinder-release.apk $ adb -d install -r bin/PairFinder-release.apk pkg: /data/local/tmp/PairFinder-release.apk Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES] 641 KB/s (52620 bytes in 0.080s) </code></pre> <p>I found that answered here.</p> <p><a href="https://stackoverflow.com/questions/3185444/how-to-deal-with-install-parse-failed-inconsistent-certificates-without-uninstal">How to deal with INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES without uninstallation</a></p> <p>I only needed to uninstall it and then it worked!</p> <pre><code>$ adb -d uninstall com.kizbit.pairfinder Success $ adb -d install -r bin/PairFinder-release.apk pkg: /data/local/tmp/PairFinder-release.apk Success 641 KB/s (52620 bytes in 0.080s) </code></pre> <p>Now I only need modify the build.xml to use those options when signing!</p> <p>Ok here it is: C:\Program Files\Java\android-sdk\tools\ant\build.xml</p> <pre><code> &lt;signjar sigalg="MD5withRSA" digestalg="SHA1" jar="${out.packaged.file}" signedjar="${out.unaligned.file}" keystore="${key.store}" storepass="${key.store.password}" alias="${key.alias}" keypass="${key.alias.password}" verbose="${verbose}" /&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload