Trying to refresh 'expired' keystore

孤街醉人 提交于 2019-12-04 06:20:55
maaartinus

You're mixing up the terms. A keystore contains keys, a key is something used for signing.

AFAIK, you're trying to put a new key into an old keystore using an existing alias (name). Why don't you simply used a new one? Either this or delete the old key from the keystore first. You don't need to drop the whole keystore.

Have a look at portecle, this simple tool allows you to manipulate the keystore more easily.

For this simply regenerate you certificate again follow these steps.

   1)keytool -genkey -v -keystore mycertificate.keystore -alias mykey -keyalg 
   RSA -keysize 2048 -validity 1000
   2)  jarsigner -verbose -keystore mycertificate.keystore D:\app.apk mykey
   3) jarsigner -verify app.apk
     If it  will have done then shows a message "successfully verified"
   4) zipalign -v 4 D:\app.apk D:\signedapp.apk

  it will generate new certificate. enjoy :)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!