google / bundletool

Bundletool is a command-line tool to manipulate Android App Bundles
https://g.co/androidappbundle
Apache License 2.0
3.45k stars 380 forks source link

Error while loading private key and certificates from the keystore #300

Open jeffrylgh opened 1 year ago

jeffrylgh commented 1 year ago

I execute "java -jar bundletool-xxx.jar build-apks --bundle=weka-obfuscated.aab --output=weka.apks --ks=../../KeyInfo/weka_key.jks --ks-key-alias=weka_key", there is a problem after entering the password

Sstrip commented 1 year ago

Me too. Have you solved it?

khungnguyen commented 1 year ago

Having same problem [BT:1.14.1] Error: Error while loading private key and certificates from the keystore. com.android.tools.build.bundletool.model.exceptions.CommandExecutionException: Error while loading private key and certificates from the keystore. at com.android.tools.build.bundletool.model.exceptions.InternalExceptionBuilder.build(InternalExceptionBuilder.java:57) at com.android.tools.build.bundletool.model.SignerConfig.extractFromKeystore(SignerConfig.java:180) at com.android.tools.build.bundletool.commands.BuildApksCommand.populateSigningConfigurationFromFlags(BuildApksCommand.java:1688) at com.android.tools.build.bundletool.commands.BuildApksCommand.fromFlags(BuildApksCommand.java:786) at com.android.tools.build.bundletool.commands.BuildApksCommand.fromFlags(BuildApksCommand.java:752) at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:83) at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:55) Caused by: java.io.IOException: Invalid keystore format at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source) at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source) at sun.security.provider.KeyStoreDelegator.engineLoad(Unknown Source) at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(Unknown Source) at java.security.KeyStore.load(Unknown Source) at com.android.tools.build.bundletool.model.SignerConfig.extractFromKeystore(SignerConfig.java:133) ... 5 more I can be sure that I provided right keystore information : Alias + password. Don't know what's happening now Could anyone help us? Thank you

wq1110 commented 11 months ago

me too

Allison001 commented 10 months ago

me too,who solved it?

TJHello commented 7 months ago

me too,who solved it?

fflin commented 1 month ago

just user jdk17 to fix it

chanbenny111 commented 1 week ago

use different jdk version work for me。bundletool-all-1.15.0 use java 11