“包文件未正确签名"错误 -- 检测 Google Play 应用 apk 是否会发生 [英] "Package file was not signed correctly" error -- detect whether or not it will happen with Google Play app apk
问题描述
我遇到了以下问题中描述的错误问题:
I am having problems with the error described in the questions below:
已发布的 Android apk给出错误包文件未正确签名"
一些(但不是全部)用户收到包文件未正确签名"从 Google Play 下载我的应用时
具体来说,当一些用户尝试下载我的 Google Play 应用时,他们会收到错误消息,而其他人则不会.
Specifically, when some users try to download my Google Play app, they get the error, others don't.
我的问题是:如何在提交前检测是否会出现问题?
My question is: how to detect before submission whether the problem is going to occur or not?
当我跑步时,它的价值是什么
For what it's worth, when I run
jarsigner -verify -verbose -certs myapk.apk
我看到类似以下内容:
86226 Sun Nov 09 10:34:54 EET 2014 META-INF/MANIFEST.MF X.509,//[省略个人物品] [证书有效期为 8/20/14 8:04 AMto 1/5/42 7:04 AM] [CertPath 未验证:路径不与任何信任锚]//几百个像上面这样的条目,然后:jar 验证.
86226 Sun Nov 09 10:34:54 EET 2014 META-INF/MANIFEST.MF X.509, //[personal stuff omitted] [certificate is valid from 8/20/14 8:04 AM to 1/5/42 7:04 AM] [CertPath not validated: Path does not chain with any of the trust anchors] // several hundred entries like the above, and then: jar verified.
警告:此 jar 包含其证书链不是验证.这个 jar 包含的签名不包括时间戳.如果没有时间戳,用户可能无法验证这一点签署者证书到期日期 (2042-01-05) 之后的 jar 或在任何未来撤销日期之后.
Warning: This jar contains entries whose certificate chain is not validated. This jar contains signatures that does not include a timestamp. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2042-01-05) or after any future revocation date.
推荐答案
实际上这是一个常见问题,我猜您一定在使用 Java 7 或更高版本.
Actually this is a common problem and i guess you must be using Java 7 or later.
解决方案
运行 jarsigner:
Run jarsigner:
jarsigner -verbose -verify -keystore ${KEYSTORE_PATH} ${YOU_JAR_FILE}
看看这里
这篇关于“包文件未正确签名"错误 -- 检测 Google Play 应用 apk 是否会发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!