Jarsigner:ANDROIDS缺少签名块

时间:2013-10-08 19:01:38

标签: android jarsigner

我签了apk,但是当我尝试使用jarsigner进行验证时:

jarsigner -verify -verbose -certs sample.signed.apk

但是我说错了:

jarsigner: Signature Block missing for ANDROIDS

我不清楚我应该在哪里研究这个问题。有人可以给我一个暗示吗?

2 个答案:

答案 0 :(得分:0)

你是如何签署jar文件的?

来自Java文档here看起来像

-verify
   If this appears on the command line, the specified JAR file will 
   be verified,not signed. If the verification is successful,
   "jar verified" will be displayed. If you try to verify an unsigned
   JAR file, or a JAR file signed with an unsupported algorithm 
   (e.g., RSA when you don't have an RSA provider installed), 
   the following is displayed: "jar is unsigned. (signatures  
   missing or not parsable)" It is possible to verify JAR files 
   signed using either jarsigner or the JDK 1.1 javakey tool, or both.

答案 1 :(得分:0)

事实证明我使用的jarsigner版本是在JDK1.6上。我升级到1.7后。问题解决了。