Android release build doesn't work

Hi,

I’d like to make a build for the android store. So i started with generating a .keystore file, which i did with keytool and the following command:

keytool -genkey -v -keystore android_release_key.keystore -alias release_key -keyalg RSA -keysize 2048 -validity 20000

after I filled in the fields (well, I left some of them; I think this shouldn’t be the problem) i built the app with the new .keystore instead of the debug keystore.

Then I tried to upload the app to the market, which gave me the following error:
“market requires versioncode to be set to a positive 32-bit”, well my builtsettings.lua file looks like that:

settings =
{
iphone =
{
plist =
{
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles = {
“Icon.png” ,
“Icon@2x.png” ,
“Icon-72.png” ,
},
},
},

android =
{
versionCode = “90”,
versionName = “0.9”,
},
}

which, I suppose shouldn’t be the problem either.

Than I tried downloaded the generated .apk, to try if it would work on the device. It didn’t. While installing i got a message on the screen, that the application wasn’t installed. Than I just changed again back to the androiddebugkey and it worked on the device again.
Where is my mistake? [import]uid: 68079 topic_id: 18231 reply_id: 318231[/import]

Do you have an ARMv7 compatible device? ARMv6 devices are not compatible with Corona. [import]uid: 5712 topic_id: 18231 reply_id: 69794[/import]

As i said it works on the device if i use the debugkeystore. [import]uid: 68079 topic_id: 18231 reply_id: 69800[/import]

Is there a reason version code is set to 90? What did you set it to when building? (Where Corona has you type it in.)

Peach [import]uid: 52491 topic_id: 18231 reply_id: 69856[/import]

It was intended to work as a id for version 0.90. So I can than write 91 for 0.9.1 and so forth. In the field of the building dialog i had 90 as well.

I think I try the normal Version with 1.0 and 1 once. But it should work as the only restriction is that it has to be an 32 bit integer…

//EDIT
I tried it with 1 and 1.0, but it didn’t work either. [import]uid: 68079 topic_id: 18231 reply_id: 69866[/import]

So the version code in the build.settings file and the version number you entered when building matched exactly, or no? [import]uid: 52491 topic_id: 18231 reply_id: 69978[/import]

Yes.
But i think the problem has something to do with the keystore as the version stuff works if i use the debugkeystore…
Can someone look at the commandline? I basically copied from the android doc. Just changed the name and the alias. [import]uid: 68079 topic_id: 18231 reply_id: 70017[/import]

I don’t do a lot with Android and it has been ages since I made a new keystore, however I DID write a step by step tutorial on creating one on a Mac. Link; http://techority.com/2011/09/24/how-to-generate-a-key-for-your-android-app/

If in doubt, create a new one.

May also be worth having a read about versionName and versionCode here; http://developer.anscamobile.com/content/configuring-projects

Peach :slight_smile: [import]uid: 52491 topic_id: 18231 reply_id: 70022[/import]

I think I got it now. The versionName features was just introduced last week. I thought it was longer present and I now had to update the SDK with a daily build. Now it works with my keystore.

But this brings me to the question: How was the setting of a appropriate version done before? It can’t be, that the android version always was 1.0?!

Still there is just the daily build to make this version thing work… [import]uid: 68079 topic_id: 18231 reply_id: 70025[/import]

Honestly, Android not being something I’m overly comfortable with yet, I’m not sure - I had previously uploaded two apps for Android and updated one with no issues. (This was prior to versionName, mind you.)

I take it your app is now on the store? :slight_smile:

Peach [import]uid: 52491 topic_id: 18231 reply_id: 70098[/import]

Yes, but even if it works without an issue: How did you handle that you can update the version to say 1.1 or so? Otherwise the users on the android store see always 1.0… don’t they?

No, the app is not yet on the store because i have to wait for the approval of apple for the iPhone version. [import]uid: 68079 topic_id: 18231 reply_id: 70248[/import]

Hello Christian,

I work on Corona for Android, so let me help clear some things up.

We’ve just added versionName support about a month ago. Before then, your app would have defaulted to “1.0”. This string represents the human readable version number which is displayed in the Marketplace and under Manage Applications on an Android device. It is not used to managed upgrades.

The versionCode entry in the build.settings file needs to be a number. It will not be accepted as a string. If you provide it as a string, then it will default to a versionCode of 0, thus it will fail to be accepted at the marketplace if they already have a version of your app.

If you use the newest daily build of Corona, notice that we’ve added a new “Version Name” field to the build window. Also, we’ve fixed the Version Code field in the build window, where as in the previous daily builds it failed to write the version code to your app (thus defaulting to zero and failing).

So, if you are using the newest daily builds, then you should delete your versionCode and versionName entries in your build.settings file, because they will “override” their respective settings in the build window. That means your version code and name that you’ve entered into the build window will be ignored and your app will use the build.settings file’s versionCode and version name instead. Probably not what you want.

You can verify that the version name for your app is correct by installing it to your Android device. Go to the “Manager Applications” screen on your Android device and tap on your app. The version name string will appear there.

I hope this helps!
[import]uid: 32256 topic_id: 18231 reply_id: 70323[/import]

Yes. That’s everything clear by now.

But am I right if up to one month ago all corona based android applications on the store had version 1.0? (versionName)

That’s the thing that confuses me because I don’t see any possibilty to change the versionName without using your new solution.

Thanks for help,
Christian [import]uid: 68079 topic_id: 18231 reply_id: 70337[/import]

Yes, all applications were set with a version name of “1.0” before. Some Corona developers were changing the version name after the build by hacking their APK with apktool and editing the resulting AndroidManifest.xml file by hand… but I can’t condone that method. Especially since apktool was not developed by Google and it’s possible that it may not disassemble the APK perfectly.

If you do not want to use a daily build to build your apps, then just to let you know, we plan on releasing a release version sometime in December. [import]uid: 32256 topic_id: 18231 reply_id: 70427[/import]

Ah. Allright.
No, the daily build is perfectly fine as long as it behaves more or less stable. :wink:

But there is another thing I’d like to see changed, but I’ll open a new thread for that (concerning the windows start menu).

Thanks [import]uid: 68079 topic_id: 18231 reply_id: 70428[/import]

Try using a different scale option.

See here; http://developer.anscamobile.com/content/configuring-projects

In future please make a new thread - this is not related to this topic.

Thanks,

Peach :slight_smile: [import]uid: 52491 topic_id: 18231 reply_id: 70492[/import]

?
[import]uid: 74537 topic_id: 18231 reply_id: 70448[/import]