第一种报错:A JNI error has occurred, please check your installation and try again
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/google/wireless/android/vending/developer/signing/tools/extern/export/ExportEncryptedPrivateKeyTool has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
JDK版本问题,要JDK11以上版本,但是版本不能太高,最好就用JDK11
第二种报错:Unable to export or encrypt the private key
Error: Unable to export or encrypt the private key
java.security.UnrecoverableKeyException: Get Key failed: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
at java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:462)
at java.base/sun.security.util.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:90)
at java.base/java.security.KeyStore.getKey(KeyStore.java:1057)
这个就是证书的密码不正确
如果确定密码正确的,还有可能,JDK版本过高
第三种报错:Cannot find any provider supporting RSA/NONE/OAEPWithSHA1AndMGF1Padding
这种大概意思就是解密不对应
请更换OpenJDK 11以上的JDK,
总结:就是一点要用OpenJDK 11以上,并且不能太高版本的,22版本的也会报错