Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

signing android app
Started by htrager001 Oct 27 2016 04:35 AM

6 replies to this topic

Best Answer Rob Miracle , 28 October 2016 - 06:27 AM

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

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

htrager001

[GLOBAL: userInfoPane.html]
htrager001
  • Observer

  • 25 posts
  • Corona SDK

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

 

 



[TOPIC: post.html]
#2

bgmadclown

[GLOBAL: userInfoPane.html]
bgmadclown
  • Contributor

  • 706 posts
  • Corona SDK

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.



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,646 posts
  • Enterprise

@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



[TOPIC: post.html]
#4

htrager001

[GLOBAL: userInfoPane.html]
htrager001
  • Observer

  • 25 posts
  • Corona SDK

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.



[TOPIC: post.html]
#5

bgmadclown

[GLOBAL: userInfoPane.html]
bgmadclown
  • Contributor

  • 706 posts
  • Corona SDK

[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,646 posts
  • Enterprise

  Best Answer

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



[TOPIC: post.html]
#7

htrager001

[GLOBAL: userInfoPane.html]
htrager001
  • Observer

  • 25 posts
  • Corona SDK

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... 




[topic_controls]
[/topic_controls]