Error: Invalid keystore format.

Hi all,

I have followed the instructions here on generating a keystore but I am stuck with the error Error: Invalid keystore format. 

I checked the generated error log and I have notice these lines:

-----

[ERROR] [Build]    > com.android.ide.common.signing.KeytoolException: Failed to read key baniokeystore from store "/var/lib/builder/builds/992c0fce-88d4-4cf6-8dd7-e1e89f1f3b88/keys/android.keystore": Invalid keystore format

[2021-05-15T05:16:48.970Z] [ERROR] [Build] * Try:

[2021-05-15T05:16:48.970Z] [ERROR] [Build] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

[2021-05-15T05:16:48.970Z] [ERROR] [Build] * Get more help at https://help.gradle.org

[2021-05-15T05:16:48.970Z] [ERROR] [Build] BUILD FAILED in 1m 22s

[2021-05-15T05:16:48.970Z] [ERROR] [Build] Command failed with exit code 1: /var/lib/builder/builds/992c0fce-88d4-4cf6-8dd7-e1e89f1f3b88/source/platforms/android/gradlew cdvBuildRelease -b /var/lib/builder/builds/992c0fce-88d4-4cf6-8dd7-e1e89f1f3b88/source/platforms/android/build.gradle --parallel

[2021-05-15T05:16:48.970Z] [ERROR] [Build] Build failed with the following error: Invalid keystore format.

[2021-05-15T05:16:48.971Z] [INFO] [Build] Remove debug/release signing properties

[2021-05-15T05:16:48.972Z] [INFO] [Build] Zipping application source...

[2021-05-15T05:17:08.857Z] [INFO] [Build] Application was not successfully generated!

[2021-05-15T05:17:08.858Z] [INFO] [Build] Execution time: 225544ms


Anyone here knows how to handle this issue?

Solution

Hi AJ,

Thanks for the advice but I did follow all the documentations regarding the generation of release build of my .APK and how to publish it on Google Play as listed below:

Those didn't really help me on the issue that I have faced. So after a lot of errors on my Mobile App Log, I did found the solution by downloading KeyStore Explorer.

Following the steps on this article, a keystore file will be generated on the file location of the keystore command tool which is inside C:\Program Files\Java\<jdk version>\bin since I need to execute the command on the folder where the keystore command tool is located.

I tried opening the keystore file on the KeyStore Explorer, did some changes like changing the password, and saved it but I was greeted by an error message saying "cannot access the file". So I tried launching KeyStore Explorer with admin rights and successfully saved the file.

The solution for me was moving the keystore file outside of the bin folder to my folder OR just create the keystore file using the tool I mentioned above and save it to another location outside C:.

Thanks,

Gab

Hello Gab,

Please check the following thread if it helps:-

https://www.outsystems.com/forge/component-overview/1550/key-store-plugin

And as per documentation there will be a .keystore file generated in your respective location. Please ensure it created and present over there.


Thanks,

Krunal

Do I need to use the Keystore Plugin or just follow the documentation?

I have followed the documentation and I can confirm that the .keystore file is present on the folder location where I generated the file:

 

Hello Gab,

As i am understanding You want to publish your app on google play store.

Please follow this documentation step by step which will help you-

https://success.outsystems.com/Documentation/10/Delivering_Mobile_Apps/Generate_and_Distribute_Your_Mobile_App/Generate_and_Publish_Your_Mobile_App_to_the_Mobile_App_Stores/Publish_Your_Mobile_Android_Application_to_the_Google_Play_Store

And also please check the key store best practises that ensures your key store follows best practises


Thanks,

Krunal

Thanks for the quick response Krunal.


Correct, I am now publishing my app on Google Play.

I believe that I have read and followed the documentations and steps regarding android app publishing but I am stuck because of the error.


Thanks,

Gab

Hello Gab,

Yes you can check the keystore plugin once if it solves your issue.

Please check this thread to understand the usage of it-

https://www.outsystems.com/forums/discussion/43666/how-to-use-key-store-plugin/


Thanks,

Krunal

Hello @Gab Globio,

Though you have created the keystore file, to generate the APK file using a Release Build Type, you need to configure a keystore file property in your build configurations in Service Center. as recommended here. Hope that does it,

Regards

AJ

Solution

Hi AJ,

Thanks for the advice but I did follow all the documentations regarding the generation of release build of my .APK and how to publish it on Google Play as listed below:

Those didn't really help me on the issue that I have faced. So after a lot of errors on my Mobile App Log, I did found the solution by downloading KeyStore Explorer.

Following the steps on this article, a keystore file will be generated on the file location of the keystore command tool which is inside C:\Program Files\Java\<jdk version>\bin since I need to execute the command on the folder where the keystore command tool is located.

I tried opening the keystore file on the KeyStore Explorer, did some changes like changing the password, and saved it but I was greeted by an error message saying "cannot access the file". So I tried launching KeyStore Explorer with admin rights and successfully saved the file.

The solution for me was moving the keystore file outside of the bin folder to my folder OR just create the keystore file using the tool I mentioned above and save it to another location outside C:.

Thanks,

Gab

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.