Why it shows error "failed to create keystore " in android studio?This is happening when I create a keystore for signed apk
Asked Answered
D

8

18

Why it showing failed to create keystore?

I tried alot but not working. I entered all correct information but it working.

Desouza answered 10/2, 2023 at 16:18 Comment(0)
J
27

This happened to me when I used a comma in my Organization name. For example, if you try Company, Inc it will fail. I removed the comma and it worked after that fine. I believe this is a bug in the tool and that the comma just needs to be escaped.

Jest answered 27/7, 2023 at 19:5 Comment(4)
I don't have any commas or dots and still that stupid error, only spaces in organization between wordsFall
what about the other fields? They probably have the same issue.Jest
Thank you. A comma was my problem. Sure should be nice if it gave better feedback.Entoderm
For me it was just invalid path in the path field. They should highlight which field is incorrect, it is very unfriendly UI/UX.Film
D
3

Try clicking the folder icon in the "Key store path: " field. I gotthe error when I manually entered a relative path or simply a file name. After I clicked the folder icon, and used the dialog, it composed an absolute path and I was able to create the keystore.

Dislimn answered 25/12, 2023 at 19:37 Comment(0)
F
2

idk why but you can open jdk\bin dir from cmd and type this line : "keytool -genkey -v -keystore drive:\adress\keyName.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias aliasName" and then fill all question. now key generated so use "choose existing key" button and go to your dir and select key. if dont see key there, drag and drop key from dir that key generated to android studio "choose existing key" dialog and then select it. hope this be helpful.

Famed answered 20/4, 2023 at 13:40 Comment(0)
C
2

For me it failed because I entered a path to existing folder as key store path.

I have long forgotten what is the java keystore, so I created a folder named keystore and specified its path in the dialog field before confirming the dialog. As it turned out the keystore is a file not a folder, so Android Studio could not create a file since there was a folder already. I got "Permission denied" error.

I have added the .jks extension and the keystore file was successfully created.

Cutlip answered 24/3 at 12:41 Comment(0)
I
1

I had also the same problem and in my case I was using '+' sign in front of country code, after removing that plus sign and following with only two digits, it created new keystore.

Ilan answered 21/5 at 10:32 Comment(0)
W
0

I followed these steps to fix "failed to create keystore"

  1. Check idea.log in C:\Users\user\AppData\Local\Google\AndroidStudio2022.3\log

  2. Search for this error in logs:

    com.android.ide.common.signing.KeytoolException: Failed to create keystore.

  3. Check error and found this log!

    IllegalArgumentException: invalid date string: Unparseable date: "òôðóðõðùððõóG

  4. So i find out it related to date. now i change date region in settings and worked

enter image description here

  1. As it mentions in image you must restart android studio and retry to create key store
Wonted answered 5/3 at 9:23 Comment(0)
S
0

In my case, the issue was caused by a special character, the UK pound (£) symbol, in the password. After changing the password, the keystore functioned properly.

Slack answered 18/8 at 16:0 Comment(0)
G
-1

For me it was + symbol for phone number, I replaced it with 00

Golgotha answered 30/7 at 15:20 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Selway

© 2022 - 2024 — McMap. All rights reserved.