[英]java.io.IOException: Invalid keystore format / Unrecognized keystore format. Please load it with a specified type, when using an old android keystore
I tried to sign an old Android application with Android Studio 4.0.1 (which I successfully signed say, 1 year ago) and it seems the keystore cannot be open anymore.我尝试使用 Android Studio 4.0.1(我在 1 年前成功签署)签署了旧的 Android 应用程序,看来密钥库无法再打开了。 I checked the credentials carefully but I don't think it comes from that.
我仔细检查了凭据,但我不认为它来自那里。 I also checked the various answers with "Invalid keystore format" on the Internet but get no luck here.
我还在互联网上使用“无效的密钥库格式”检查了各种答案,但在这里没有运气。
The android JRE raises this error: android JRE 引发此错误:
$ /Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/jre/bin/keytool -list -keystore android.keystore -v
erreur keytool : java.io.IOException: Invalid keystore format
java.io.IOException: Invalid keystore format
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:663)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
at java.security.KeyStore.load(KeyStore.java:1445)
at sun.security.tools.keytool.Main.doCommands(Main.java:823)
at sun.security.tools.keytool.Main.run(Main.java:366)
at sun.security.tools.keytool.Main.main(Main.java:359)
$ /Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/jre/bin/java -version
openjdk version "1.8.0_242-release"
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
OpenJDK 64-Bit Server VM (build 25.242-b3-6222593, mixed mode)
It is quite the same message with the OS one:这是与操作系统完全相同的消息:
$ keytool -list -keystore android.keystore -v
keytool error: java.security.KeyStoreException: Unrecognized keystore format. Please load it with a specified type
java.security.KeyStoreException: Unrecognized keystore format. Please load it with a specified type
at java.base/java.security.KeyStore.getInstance(KeyStore.java:1809)
at java.base/java.security.KeyStore.getInstance(KeyStore.java:1680)
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:936)
at java.base/sun.security.tools.keytool.Main.run(Main.java:417)
at java.base/sun.security.tools.keytool.Main.main(Main.java:410)
$ java --version
openjdk 14.0.2 2020-07-14
OpenJDK Runtime Environment (build 14.0.2+12-46)
OpenJDK 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing)
I think I have already met this issue in the past and had to revert to an older version of the JRE to keep on opening my keystore properly (solution I am currently trying now).我想我过去已经遇到过这个问题,必须恢复到旧版本的 JRE 才能继续正确打开我的密钥库(我现在正在尝试的解决方案)。
In my case I found the solution by deleting the existing .jks file in the existing path .就我而言,我通过删除现有路径中的现有.jks文件找到了解决方案。
Either choose a new path to export or delete .选择新路径导出或删除。 Before deleting I would recommend taking a backup.
在删除之前,我建议进行备份。
I think I have already met this issue in the past and had to revert to an older version of the JRE to keep on opening my keystore properly (solution I am currently trying now).我想我过去已经遇到过这个问题,必须恢复到旧版本的 JRE 才能继续正确打开我的密钥库(我现在正在尝试的解决方案)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.