[Resolved] Android: Can't Build For Release (Keystore Issue?)

I’ve been following the instructions here to sign and build my Android application, but somewhere along the line the process is failing.

When I hit the “Build” button in Corona (after linking my application to the correct keystore), I’m prompted to input the password for my alias. But after doing so, Corona quits back to the “Build for Android” screen without actually outputting an APK. I’m not receiving any error messages either visually or through the Corona Terminal.

I’m assuming it’s a keystore issue because building with the debug key works just fine.

I don’t believe I’m typing in the wrong password. I’ve tried this several times and I keep getting the same result.

Any ideas? :frowning: [import]uid: 82003 topic_id: 24611 reply_id: 324611[/import]

Follow my tutorial, it should help you fix your issues:

http://developer.anscamobile.com/forum/2011/04/16/signing-android-applications-3-easy-steps

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

I’ve been following your instructions exactly, but it doesn’t seem to work :frowning:

Here’s what I’m tying into the terminal. Maybe you’ll catch me doing something wrong.

~ keytool -genkey -v -keystore GraveyardSnuggleKeystore.keystore -alias aliasname -keyalg RSA -validity 999999
Enter keystore password: [my password]
Re-enter new password: [same password as above]
What is your first and last name?
[Unknown]: [my name]
What is the name of your organizational unit?
[Unknown]: [I left this blank]
What is the name of your organization?
[Unknown]: [I left this blank, as well]
What is the name of your city or locality?
[Unknown]: Vancouver
What is the name of your state or province?
[Unknown]: British Columbia
What is the two-lettered country code for this unit?
[Unknown]: CA
Is [all of the above] correct?
[no]: yes
Generating 1,024 bit RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 999,999 days
for: [all of the above]
Enter key password for
(RETURN if same as keystore password): [RETURN]



That’s all fine, right? Are there any restrictions on the password or any of the question fields that I should be aware of? [import]uid: 82003 topic_id: 24611 reply_id: 99671[/import]

That looks correct, if your using Mac OS you have to put sudo before keytool. Let me know if that solves your problem.

If that doesn’t solve your problems, simply restart your computer and that should solve your issues. Sometimes terminal and Corona gets screwed up, and just simply restarting your computer fixes the bugs.

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

In addition to Jordan’s suggestion, you might also want to try hitting Build button again.

The thing is, I kind of remember I needed to insist that Corona build it for me – meaning, I kind of remember having to enter the password for both keystore and alias, but then, Corona wouldn’t start the build process, so I clicked on the button to start the build one more time, and then it started its build process. After that, it has not asked for password again. It now knows where to find my keystore (so I don’t have to browse for it) and no need for me to enter password. Nice and streamlined.

Naomi [import]uid: 67217 topic_id: 24611 reply_id: 99680[/import]

Hmm…I’m not sure if it was the “sudo,” the restart, or hitting “Build” twice. But everything is working for me now :slight_smile: Thanks for the quick responses! Much appreciated!! :slight_smile: [import]uid: 82003 topic_id: 24611 reply_id: 99685[/import]

naomi do i need to be a paying custome3r to getn the keystore.
Well right now i am unable to build the project for an android device because it keeps asking me for a password. Any information you could help with would be good or anybody else [import]uid: 139898 topic_id: 24611 reply_id: 106534[/import]

@kharylambie, I’d imagine you can generate your keystore whether or not you are a paid Corona customer. Just try following Jordan’s 3 easy step (the link is posted above in the post #1.)

In terms of using your own keystore to generate an Android build, I’m not sure. I don’t know what the build process is like while being a test driver. Are you able to build with Debug (androiddebugkey)? If you can, but not with your own keystore, then it might be because you are a test driver…

Naomi [import]uid: 67217 topic_id: 24611 reply_id: 106577[/import]

Regarding the 3 steps, do they include inserting an alias name in there? Step two only mentions replacing mykeystore? [import]uid: 94653 topic_id: 24611 reply_id: 106859[/import]

Alias mentioned here; http://techority.com/2011/09/24/how-to-generate-a-key-for-your-android-app/ (also in comments) - hopefully that helps.

Peach :slight_smile: [import]uid: 52491 topic_id: 24611 reply_id: 106948[/import]

Yes, it was your advise that sorted it out Peach. In the Ninja Pig steps it mentions using ‘sudo’ at the start if you’re on Mac, so I did. After hours of trying every which way and following threads, I came across yours, the example of which is for Mac but does’t use ‘sudo’.

Other issues may have been involved but that was the only word I changed. Thanks again. [import]uid: 94653 topic_id: 24611 reply_id: 106978[/import]