Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

keytool error: java.io.FileNotFoundException: C:\AndroidWorkspace\androidKey\public.jks (The system cannot find the path specified)

I am to trying to create a signed app in Android Studio, but i am stuck at this error which says

keytool error: java.io.FileNotFoundException: C:\AndroidWorkspace\androidKey\public.jks (The system cannot find the path specified)

I get this error when i am creating a new key store. i am confused, why would it search for this key, when i am trying to create a new one.

Android Studio : V1.1.0

JRE: 1.8.0_25-b18 amd64

like image 410
Brad Avatar asked Feb 22 '15 15:02

Brad


3 Answers

On windows if you are trying to generate the key using the cmd and copying the command from the android docs which is the following:

keytool -genkey -v -keystore c:\Users\USER_NAME\key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key

you need to change the USER_NAME part to what ever is your PC name which is a folder name in the users folder and then execute the code. For example if my users folder name is Taba then I have to execute this code:

keytool -genkey -v -keystore c:\Users\Taba\key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key

Or you can even change the directory to where ever you like the .jks file to be saved.

like image 54
Taba Avatar answered Oct 17 '22 08:10

Taba


Windows path might be the problem

 keytool -genkey -v -keystore c:\key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key

Use a path like above where the slash used is backward slanting.

like image 25
Divakar Rajesh Avatar answered Oct 17 '22 08:10

Divakar Rajesh


If the error says "permission denied" above, then if you run the command in cmd, run cmd as administrator.

like image 41
Jihad Mehdi Avatar answered Oct 17 '22 07:10

Jihad Mehdi