在升级到jdk1.8后,发现jarsigner不好用了,使用之前的方式签名apk时,总是报这个错
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2042-10-11) or after any future revocation date.
于是各种查
---------------------分隔线----------------百度无能,万能GOOGLE----------------------
一,生成 .keystore签名文件
dos下进入JDK的bin目录
运行如下命令:
keytool -genkey -alias android -keyalg RSA -validity
20000
-keystore android.keystore
(-validity 20000代表有效期天数),命令完成后,bin目录中会生成android.keystore
查看签名的相关信息:
keytool -list -keystore
"android.keystore"
输入你设置的keystore密码
【前提】dos下进入JDK的bin目录
JDK1.8 命令:(需要指定tsa,如下面指令)
jarsigner -tsa http://timestamp.digicert.com -sigalg SHA1withRSA -digestalg SHA1 -verbose -keystore android.keystore -signedjar signed.apk unsign.apk alias_name