signing android app

Hi

I have a problem uploading my first .apk to android for publish

I get an error saying my app isn’t signed and I have no idea how to do that.

I got from this https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

that I should try command prompt

keytool -genkey -v -keystore mykeystore.keystore -alias aliasname -keyalg RSA -validity 999999

Put I get en error here ‘Keytool’ is not recognised as an internal or external command, operable program or batch file

I guess you are using Windows. You need to go to your JDK subfolder located under Java folder where keytool.exe is located and run the command. Also, you may need to open command prompt with admin privileges or create the key in your java folder and move it to a folder of your choice later.

@bgmadclown is correct. “keytool” is a program in the Java JDK binary folder. The path is something like:

C:\Program Files (x86)\Java\jdk1.8.40\bin\keytool.exe

But the path changes with each minor update to Java. You have to run the program either by changing directory into that folder and typing: keytool and the rest of the command but . . .

The default command expects to output the keystore in the folder where you typed the command. The folder where keytool.exe lives is not writable, so you have to include some path as part of the output file name to where to write the file to.

cd C:\Program Files (x86)\Java\jdk1.8.40\bin

keytool -genkey -v -keystore %HOMEPATH%\mykeystore.keystore -alias aliasname -keyalg RSA -validity 999999

or something like that, you have to change the path to be the right place on the cd command and you may want to output your keystore someplace other that %HOMEPATH%. You probably want to name the file something other than “mykeystore” and you want an aliasname that is something other than aliasname.

Rob

thanks for the help. 

Now I might be a bit slow but I just want to understand it better.

The Keytool generates a file that I have to include when building the apk?

Also. Running something from the commandprompt seams a bit dated.

You can find more information on the subject here: https://coronalabs.com/blog/2014/08/26/tutorial-understanding-android-app-signing/

The keytool generates a file called a keystore that you need to include on the Corona SDK.

The keystore can store multiple keys (or aliases) which is why you have to also specify the alias. Some people will create a keystore with a single alias for each app. Some people will create a single keystore with a different alias for each app. Some people will go with a less secure way and only do this once and use the same keystore/alias for all their apps. 

As for command line work being antiquated, one would think so. But Java is still very much driven by command line tools like keytool.

Rob

It took me a while but I finally got it. I had some issues with getting the path for where I wanted to save the file right.

Man! Coding an app is just half the work… The rest is figuring out what to write for promo, and using the right pictures… 

I guess you are using Windows. You need to go to your JDK subfolder located under Java folder where keytool.exe is located and run the command. Also, you may need to open command prompt with admin privileges or create the key in your java folder and move it to a folder of your choice later.

@bgmadclown is correct. “keytool” is a program in the Java JDK binary folder. The path is something like:

C:\Program Files (x86)\Java\jdk1.8.40\bin\keytool.exe

But the path changes with each minor update to Java. You have to run the program either by changing directory into that folder and typing: keytool and the rest of the command but . . .

The default command expects to output the keystore in the folder where you typed the command. The folder where keytool.exe lives is not writable, so you have to include some path as part of the output file name to where to write the file to.

cd C:\Program Files (x86)\Java\jdk1.8.40\bin

keytool -genkey -v -keystore %HOMEPATH%\mykeystore.keystore -alias aliasname -keyalg RSA -validity 999999

or something like that, you have to change the path to be the right place on the cd command and you may want to output your keystore someplace other that %HOMEPATH%. You probably want to name the file something other than “mykeystore” and you want an aliasname that is something other than aliasname.

Rob

thanks for the help. 

Now I might be a bit slow but I just want to understand it better.

The Keytool generates a file that I have to include when building the apk?

Also. Running something from the commandprompt seams a bit dated.

You can find more information on the subject here: https://coronalabs.com/blog/2014/08/26/tutorial-understanding-android-app-signing/

The keytool generates a file called a keystore that you need to include on the Corona SDK.

The keystore can store multiple keys (or aliases) which is why you have to also specify the alias. Some people will create a keystore with a single alias for each app. Some people will create a single keystore with a different alias for each app. Some people will go with a less secure way and only do this once and use the same keystore/alias for all their apps. 

As for command line work being antiquated, one would think so. But Java is still very much driven by command line tools like keytool.

Rob

It took me a while but I finally got it. I had some issues with getting the path for where I wanted to save the file right.

Man! Coding an app is just half the work… The rest is figuring out what to write for promo, and using the right pictures…