What Do I do its -genkey -v -keystore LMGpoolgame.keystore -alias LMGgamesalias -keyalg RSA -validity 999999 So Ya What Am I going to do now :mellow:
You’ve got a lot going on here.
-
You opened another thread for this exact question, for which you are obtaining assistance from a Corona Support engineer. This is already the best place to obtain assistance.
-
The process that you are encountering issues on has been performed billions of times by people all over the world. I’m not saying that people haven’t encountered problems, but the process has been performed successfully many times, so we should be able to assume that it works.
-
I’m not sure where you are in the world, but it’s after normal work hours on a Friday night in the U.S., and it’s the start of Super Bowl weekend, which is kind of like Chinese New Year, in that the entire country shuts down to eat and drink until we get sick. The likelihood of receiving more help than has already been provided decreases exponentially because of this fact.
I realize this is frustrating, and that you want to get your app out ASAP, but the best way to approach this problem, is to do it in steps. Start with locating your JDK. Then locate the keytool.exe application, and so on. Below is the link that I use to generate my keystores, which is basically a bare-bones explanation of how to accomplish it. The fact that it’s “for Corona” doesn’t really apply, as there is no Corona-specific component of this process.
http://www.wildlionsoftware.com/2012/04/creating-android-keystore-for-corona.html
Good luck!
Thanks for the reminder Alex that I should have started my Super Bowl partying already, but alas, some of us can’t stay off line for long…
Matthew, type in these two commands exactly:
cd %HOMEPATH%
“C:\Program Files (x86)\Java\jdk1.7.0_80\bin”\keytool.exe -genkey -v -keystore LMGpoolgame.keystore -alias LMGgamesalias -keyalg RSA -validity 999999
If you do this right, it will prompt you for several items:
Enter keystore password: **type in password you want for the keystore here. It **will not** show.**
Re-enter new password: **Repeat the password you used above. Again, it will not show. The cursor won’t move.**
What is your first and last name?
[Unknown]: Type in your First and Last name
What is the name of your organizational unit?
[Unknown]: Not that important, but I usually use something like Development… But you do have to type something in.
What is the name of your organization?
[Unknown]: If you have a business name you want to use, enter it. Repeating your name is okay too.
What is the name of your City or Locality?
[Unknown]: Put in your city, township, etc.
What is the name of your State or Province?
[Unknown]: Put in the name of your state, province, etc.
What is the two-letter country code for this unit?
[Unknown]: Put in your two letter country code (i.e. US, FR, BR, UK)
Is CN=your name, OU=your orginizational unit, O=your orginization, L=your city, ST=your state, C=your country code correct?
[no]: type yes and hit enter
Enter key password for <LMGpoolgame>
(RETURN if same as keystore password): **This is technically a different password. You can use the same as the first, it’s just less secure.**
Re-enter new password: **retype the password you just typed in. Again it won’t show for either password.**
If you don’t get those prompts, please copy the exact text on your screen and paste it into a reply to this thread. If you can’t figure out how to copy/paste from a command window (it is a bit tricky), please google how to do it.
If you’ve done all of that successfully, then in Corona, click on the “Browse” button beside the keystore entry and navigate to your home folder (has Desktop, Downloads, etc. as folders). You should see LMGpoolgame.keystore as a choice to select. Select it.
It will prompt you for two passwords (the first one you entered above for the first one, and the second password above for the second one in this prompt. While less secure, making the passwords the same makes it easier on you.
Then you should see the alias field populated and you can build.
Rob
Nope I won’t let me get pass it says was not valid or the Key Store was not Valid how do I fix that
Can you make a screen shot of where you did the above?
We need exact messaging on the screen if you want to help. Please learn how to copy and paste from the command window. If you don’t provide us what we need, we can’t help. If you won’t copy/paste what’s there, please make a screen shot.
This is quite annoying this key generator issue. Same trouble here. About to give up really.
Finally, did it. I remove all Java packages including Corona SDK.
Then, re-install Corona again, and this time it guided me through the process of installing Java.
It worked, so now moving into the nicer bits of Corona.
Hope this will help someone having similar issues.
Glad you got it solved!
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