0

Used the below command to generate the keystore file:

Keytool -genkey -v -keystore trial.keystore -storetype jceks -alias trial -keyalg RSA -keysize 2048 -validity 10000 -keypass 260720 -storepass 260720

Terminal output :

Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 10,000 days for: CN=input, OU=input, O=input, L=input, ST=input, C=input [Storing trial.keystore]

Warning: The JCEKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore trial.keystore -destkeystore trial.keystore -deststoretype pkcs12".

Keystore file generated but unable to generate signd apk with the same keystore.

Error : Invalid keystore format

Build Output :

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:signReleaseBundle'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Failed to read key trial from store "/Downloads/trial.keystore": Invalid keystore format

  • Try: 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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s 29 actionable tasks: 1 executed, 28 up-to-date

Woona
  • 15
  • 6

1 Answers1

0

For android:Terminal Command use this below command:

keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 10000 -keystore keystore.jks

OR

For React-Native use below command :

keytool -genkeypair -v -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000

Sivasankar chimata
  • 311
  • 1
  • 16
  • 31