I'm getting a releasekey to my app Three months ago. Now I format my computer and when I was sign my app with my releasekey i got the error: java.lang.RunTimeException: keystore load: invalid keystore format.

How I should solve this error?

The command was: jarsigner -verbose -keystore "D:\releasekey.keystore" "D:\myApp.apk" releasekey

I'm using the older keystore (the fisrt one) but I get the error mentioned.

I tried and get this:

java.io.IOException: java.io.IOException: invalid keystore format 
at sun.security.provider.javaKeyStore.engineLoad(JavaKeyStore.java:650) 
at sun.security.provider.javaKeyStore$JKS.engineLoad(JavaKeyStore.java:55) 
at java.security.KeyStrore.load(KeyStore.java:1214) 
at sun.security.tools.KeyTool.doCommands(KeyTool.java:789) 
at sun.security.tools.KeyTool.run(KeyTool.java:340) 
at sun.security.tools.KeyTool.main(KeyTool.java:333) 

enter image description here

有帮助吗?

解决方案

The keystore holds the private encryption key used to sign the app - rerunning the command would generate a totally different key (the password just protects the file holding it - it does not have a directly relationship with the encryption key itself) - You can NOT recover/rebuild it if you lost the keystore file.

If you lost it then your users would have to uninstall the existing app completely before they can install your new version - and they will loose any data saved in the app when they uninstall it (no way around this, it's a security feature in android)

Worse then that - android play store isn't going to let you upload your new version because they aren't encoded using the same key as the old version - you'll need to release the new version under a Different package name - That means your existing users can't even upgrade automatically (they have to find the new version) - and you have no way of even telling them that they need to upgrade (you can't upload a new version of the old app...)

You gotta find that keystore file in your backups or try to recover the data from the disk - hopefully you did a 'quick' format - in which case a good data recovery service Might be able to get it back if your OS hasn't over-written it yet.

Goodluck!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top