Published Android apk gives error “Package file was not signed correctly”
Some (but not all) users receive “Package file was not signed correctly” when downloading my app from Google Play
具体来说,当有些用户尝试下载我的Google Play应用程序时,他们会收到错误,其他用户则不会.
我的问题是:在提交之前如何检测问题是否会发生?
为什么值得,当我跑
jarsigner -verify -verbose -certs myapk.apk
我看到如下所示:
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.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.
解决方法
解
运行jarsigner:
jarsigner -verbose -verify -keystore ${KEYSTORE_PATH} ${YOU_JAR_FILE}
看看here