- Home /
cannot create key in keystore
Unable to create key in keystore. Please make sure the location and password of the keystore is correct. See the Console for more details.
UnityEditor.Android.CommandInvokationFailure: Unable to create key in keystore. Please make sure the location and password of the keystore is correct. See the Console for more details. C:/Program Files (x86)/Java/jdk1.8.0_111\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Users/HP/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[ Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at SDKMain.main(SDKMain.java:129) Caused by: java.lang.IllegalArgumentException: invalid date string: Unparseable date: "glghflgfihikGMT+00:00" at org.bouncycastle.asn1.DERUTCTime.(Unknown Source) at org.bouncycastle.asn1.x509.Time.(Unknown Source) at org.bouncycastle.x509.X509V3CertificateGenerator.setNotBefore(Unknown Source) at UnityKeyToolGenKey.(UnityKeyToolGenKey.java:87) at UnityKeyToolGenKey.main(UnityKeyToolGenKey.java:29) ... 5 more ] stdout[
] at UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in :0 at UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in :0 at UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00000] in :0 UnityEditor.HostView:OnGUI()
Answer by Rash55 · May 01, 2017 at 09:40 AM
you can Create keystore file from command line :
Open Command line: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved
// (if you want to store keystore file at C:/ open command line with RUN AS ADMINISTRATOR)
C:\Windows\system32>keytool -genkey -v -keystore [your keystore file path]{C:/index.keystore} -alias [your_alias_name]{index} -keyalg RSA -keysize 2048 -validity 10000[in days] Enter > It will prompt you for password > enter password (it will be invisible) Enter keystore password: Re-enter new password: Enter > It will ask your detail. What is your first and last name? [Unknown]: [Your Name/Name of Signer] {AB} What is the name of your organizational unit? [Unknown]: [Your Unit Name] {Self} What is the name of your organization? [Unknown]: [Your Organisation Name] {Self} What is the name of your City or Locality? [Unknown]: [Your City Name] {INDORE} What is the name of your State or Province? [Unknown]: [Your State] {MP} What is the two-letter country code for this unit? [Unknown]: 91 Enter > Enter y Is CN=AB, OU=Self, O=Self, L=INDORE, ST=MP, C=91 correct? [no]: y Enter > Enter password again.
Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 10,000 days for: CN=AB, OU=Self, O=Self, L=INDORE, ST=MP, C=91 Enter key password for (RETURN if same as keystore password): Re-enter new password: [Storing C:/index.keystore] And your are DONE!!!
i have same issue unity cannot create key can you make it's video