Signing Android Applications In 3 Easy Steps

Hey Ninja Pig - great tut. With regards the password, what one is it? I may have jumped part of the procedure.

I downloaded the SDK to desktop (which it looks like I don’t need by what you say), opened the terminal and typed in the magic words. So I haven’t created a password yet - have I? [import]uid: 94653 topic_id: 8963 reply_id: 106804[/import]

No you create the password!

Regards,
Jordan Schuetz
Ninja Pig Studios [import]uid: 29181 topic_id: 8963 reply_id: 106812[/import]

Hi - I’m getting an invalid password error. I’m on MAC lion, so I presume I include the sudo at the start. Is there anything in this keystone name that’s causing a prob:

themusiciansofbremen.keystore

is it too long? Thanks [import]uid: 94653 topic_id: 8963 reply_id: 106824[/import]

Got it to work by not using sudo. Am using Mac, last thing I tried! [import]uid: 94653 topic_id: 8963 reply_id: 106897[/import]

This is super great topic Ninja Pig Studios! Thanks for it. [import]uid: 111666 topic_id: 8963 reply_id: 107598[/import]

Thanks Jordan. Very helpful ! [import]uid: 169091 topic_id: 8963 reply_id: 127279[/import]

Thanks @Ninja Pig Studios! This is a time saver! :slight_smile: [import]uid: 44127 topic_id: 8963 reply_id: 131920[/import]

Hi, I’ve got my app working now on a few Android devices with the zoomStretch fix NinjaPig mentioned. Thanks for all the hopeful notes here. I have next to generate my own keystore to use so hopefully that will work fine. In the meantime I have 2 questions:

  • when I download the app on the various Android devices the icon shown is the Corona one. Is this always the case when building in debug mode with Corona’s provided debug settings?

  • when I use the keytool command to generate my own key, what name should I use for the ‘mykeystore.keystore’ param’s ‘mykeystore’ field? Is the the actual app name (without spaces, etc.) or is it the package name filled in the Corona build dialog (i.e. com.mydomain.apps.testapp)?

Thx! [import]uid: 72317 topic_id: 8963 reply_id: 135005[/import]

For the Corona Icons, create the Icon-hdpi.png and Icon-mdpi.png in your root directory in Corona. For the keystore name, name it the name of your app (“AnnoyingPigGame.keystore”). Hope that helps. [import]uid: 29181 topic_id: 8963 reply_id: 135022[/import]

NinjaPig, thanks for the reponse! The icon shows up now properly on the device (Galaxy Nexus in this case) though it’s pretty small. I included all three icon sizes at the resultions indicated on the Corona tutorial page (the largest is 72x72 pixels). Is that correct?

Cheers!

Ken [import]uid: 72317 topic_id: 8963 reply_id: 135037[/import]

That should be good. I’m pretty sure there is an xhpi one too, there are 4 different icon sizes. [import]uid: 29181 topic_id: 8963 reply_id: 135039[/import]

Seems that there is also an Icon-xhdpi.png file (96x96 pixels) which isn’t mentioned on the Corona page. I’ll try adding that! [import]uid: 72317 topic_id: 8963 reply_id: 135040[/import]

@ken4,
I think I had the same issue just a few days ago that you are talking about. On my Galaxy S3 I had all the requried icons, but in the app icon when viewed on the phone was smaller than all the others. I ended up making a xhdpi icon and that seems to have done the trick. supposedly that icon is just for “tablets” but a lot of these new smart phones have REALLY high resolution so they might be considered a “tablet”. I am at work right now so I can’t remember the Size that I needed to make that one. I believe you just title it “icon-xhdpi” though. [import]uid: 19620 topic_id: 8963 reply_id: 135041[/import]

I am getting this error. please help me out, folks. :confused:
keytool error: java.io.FileNotFoundException: HighwayRun.keystore (Access is den
ied)
java.io.FileNotFoundException: HighwayRun.keystore (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:194)
at java.io.FileOutputStream.(FileOutputStream.java:84)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:902)
at sun.security.tools.KeyTool.run(KeyTool.java:172)
at sun.security.tools.KeyTool.main(KeyTool.java:166)

C:\Program Files (x86)\Java\jdk1.6.0_31\bin> [import]uid: 176812 topic_id: 8963 reply_id: 135311[/import]

You probably don’t have write access to the folder you’re trying to create the keystore in.

In fact it looks like you are in the Java bin directory which is probably write protected from non-admin users. You can either CD to a directory where you have write access, like your desktop, documents directory or the projects folder where your project lives and then execute the command to generate the keystore from there. Or if you feel you have to run it from the bin directory, specify a path in front of the keystore name that will put it in one of those writable directories.
Regarding Android Icons. Corona SDK has only recently started supporting the Icon-xhdpi.png icon, but the latest Stable build (971) should have it, the previous stable (840) does not. The Android icons are:

Icon-ldpi.png 36x36
Icon-mdpi.png 48x48
Icon-hdpi.png 64x64
Icon-xhdpi.png 96x96

http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html [import]uid: 199310 topic_id: 8963 reply_id: 135319[/import]

Thanks Rob, u have performed a miracle. :smiley:
i have generated the keystore file for my game. Now sir kindly guide me wat do i have to do next in order to make my game integrated with fb? and i have made the developers account on fb and have entered the details except the hash key. thanks! [import]uid: 176812 topic_id: 8963 reply_id: 135343[/import]

I’ve built Android applications before and I have already generated keystore which working perfectly in Eclipse. But when I trying to use it in Corona I keep getting “Invalid Password” error. I have two passwords there - one for the keystore itself and one is for alias. None of them are working. Please help. Should I generate new keystore? Or I simply don’t know something?

Hello Fireton,

If you have uploaded your application to the app store then you can’t use a new keystore.  If you haven’t uploaded it, then feel free to use a new keystore file for your app.  

I’m pretty sure your password is incorrect, unless your keystore got corrupted somehow.  This is why you always want to backup your keystores in case something like this happens.

I’m pretty sure your password is incorrect, unless your keystore got corrupted somehow.  This is why you always want to backup your keystores in case something like this happens.

No. It’s not corrupted. It works flawlessly when I sign aplication from within Eclipse. It’s just won’t open in Corona. By the way I can’t sign applications with Corona debug keystore either. It also says that password is incorrect. I have Windows 7 64 if it matter.

It won’t let me type in a password?

Never mind, it just never showed the characters.