Signing for Debug Build wont work in cmd admin

I have tryed to make a key in build mode wont work

I look here - Corona Docs — Guides | Building/Distribution

When I do what it says for debug mode - 

C:\> keytool -genkey -keystore my_key.keystore -alias myApp -keyalg RSA -key size 2048 -validity 9999999

‘keytool’ is not recognized as an internal or external command,

operable program or batch file.

Can someone help

Hi @matthewgordon20046,

You state that you’re aiming for a “debug” build, but the instructions you’re using are for “release” build. Can you please clarify which build type you want?

Thanks,

Brent

Yes I did I fixed it BUT it says the password for alias%s was not valid or the Java JDK was not found. I set up  a password download the latest’s java AND the one it says to in the start guide so I don’t know what to do

Hi again,

I assume you’re on Windows? Did you follow the directions for getting the proper version of JDK here? I think the version may have changed just slightly recently…

https://docs.coronalabs.com/daily/guide/start/installWin/index.html

Brent

Yes I have and it says use java JDK … I forget. But I dont think its the one that it needss the rest But dose not just work with the one on the program

The error about keytool not found is most likely due to keytool not being found in your path (a list of directories that windows looks in for programs). Since you’re typing it with out putting in a direct path, it won’t find it if that directory isn’t in the path. That command example assumes your Java JDK’s bin folder is in the path.

I don’t know the exact path but the command could be something like:

C:\Program Files(x86)\Oracle\Java_1.7R57\bin\keytool … the rest of the command.

I just don’t know the exact path that it would be on your computer.

Rob

I have something like this C:\Program Files (x86)\Java\jdk1.7.0_80\bin

And when I try to make the key now It dose something like this java.io.FileNotFoundException: LMGpool.keystore (Access is denied)

        at java.io.FileOutputStream.open(Native Method)

        at java.io.FileOutputStream.<init>(FileOutputStream.java:221)

        at java.io.FileOutputStream.<init>(FileOutputStream.java:110)

        at sun.security.tools.KeyTool.doCommands(KeyTool.java:1152)

        at sun.security.tools.KeyTool.run(KeyTool.java:340)

        at sun.security.tools.KeyTool.main(KeyTool.java:333)

NOW I REALLY NEED YOUR HELP. I made a key store went to build mode found the location at C:\Program Files (x86)\Java\jdk1.7.0_80\bin entered the password and it said The Pass word located at C:\Program Files (x86)\Java\jdk1.7.0_80\bin\LMGpoolgame.keystore was not valid or the Key Store was not Valid  What do I do now

Thanks in advance Matt

This should have all been in the guide, but let me break this down for you so you can understand what you did. This command isn’t a simple copy and paste command. It has things you have to make decisions on and understand why you make those decisions:

C:\\> keytool -genkey -keystore my\_key.keystore -alias myApp -keyalg RSA -key size 2048 -validity 9999999

The C:\> tells me you ran this command while having the root folder. This will be important in a minute.

C:\\> keytool -genkey -keystore my\_key.keystore -alias myApp -keyalg RSA -key size 2048 -validity 9999999

This runs a program called keytool with the instruction to generate a key ( -genkey )

C:\\> keytool -genkey -keystore my\_key.keystore -alias myApp -keyalg RSA -key size 2048 -validity 9999999

This tells the program to name the keystore " my_key.keystore" but since you didn’t provide a path as part of the file name, the keystore was output to *C:*   This is where you will find your keystore.

C:\\> keytool -genkey -keystore my\_key.keystore -alias myApp -keyalg RSA -key size 2048 -validity 9999999

Keystore store files can contain multiple keystores. Each keystore is identified by an alias. In this case you named it myApp. The rest is someone standard copy/pastes stuff.

All of this assumes you ran this from C:\ and you just prepended the path to the keystore to the command. You should be able to hit the browse button, navigate to c:\ and you should find my_keystore.keystore file located there. Open that, then enter your passwords.

Had you done a CD command and changed your directory to where the bin folder, then that’s where your keystore is.

Rob

Yes I have done that I am in build mode now so it says  The Pass word located at C:\Program Files (x86)\Java\jdk1.7.0_80\bin\LMGpoolgame.keystore was not valid or the Key Store was not Valid how do I fix that 

What was the exact command including the prompt where you entered the command?

Yes as in https://docs.coronalabs.com/daily/guide/distribution/androidBuild/index.html but it dose the error  

So what would I do?

Yes as in https://docs.coronalabs.com/daily/guide/distribution/androidBuild/index.html but it dose the error. So How would I fix it! 

GRRR my bolding in the code didn’t take.

Anyway, if you just copy/pasted the line from the docs it’s not going to work. You have to make decisions.  Please copy/paste the **exact** command you typed in to generate the keystore.

I know I did that :expressionless: IDK anything els

No, I need you to copy/paste it here in the forum post so I can see exactly what you used to generate your keystore.

ok this is what I did keytool -genkey -v -keystore LMGpoolgame.keystore -alias LMGgamesalias -keyalg RSA -validity 999999

So what do I do? again its. -genkey -v -keystore LMGpoolgame.keystore -alias LMGgamesalias -keyalg RSA -validity 999999