Skip to main content
Participant
December 13, 2010
Answered

Market requires versionCode to be set to a positive 32-bit integer in AndroidManifest.xml.

  • December 13, 2010
  • 5 replies
  • 7612 views

Just started playing with burrito and made my first android app. Carefully followed the tutorial and everything seems ok upto the point where I load it to the market and get the following error:

Market requires versionCode to be set to a positive 32-bit integer in AndroidManifest.xml.

in the -app.xml file I found a versionNumber but no code. Tried adding it but failed, have added it all over but still wont work.

Cant find anything anywhere. I'm stumped.

This topic has been closed for replies.
Correct answer Metaboy

Hi

There are some properties in the andriod manifest which you can't set directly.  The AIR packager sets them from you Application-XML descriptor file. In the case of the VersionCode you need to set the 'versionNumber' in your Application-XML file.  See p145 of the buildingAirApplications.pdf document which I think can download with the AIR SDK. :

"Content

The version number can contain a sequence of up to three integers separated by periods. Each integer must be a number between 0 and 999 (inclusive).

Examples

<versionNumber>1.0.657</versionNumber>

<versionNumber>10</versionNumber>

<versionNumber>0.01</versionNumber>"

My guess is that your version number is breaking the rule above ?

5 replies

Participating Frequently
December 4, 2011
Market requires versionCode to be set to a positive 32-bit integer in AndroidManifest.xml.

Well, this is just not something I can fix on my side w/o FB re-breaking it. Worse, I have not been able to upload any file to Google Market since having FlashBuilder 4.5 and now 4.6 and have rebuild one app over seven different times and now I'm pissed that this is another stupid Adobe app that I can't fix.

What can I do to make this proble go away????

Colin Holgate
Inspiring
December 4, 2011

What does your versionNumber entry look like?

Participating Frequently
December 4, 2011

This is all done automatically by FB.

Just to try something out I just now made a simple app with a label only and tried to upload to Google... FAILED!!!!

"Market requires versionCode to be set to a positive 32-bit integer in AndroidManifest.xml"

LOL, FB can't even create this. :-/

----------------------------------------------

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<application xmlns="http://ns.adobe.com/air/application/3.1">

<!-- Adobe AIR Application Descriptor File Template.

          Specifies parameters for identifying, installing, and launching AIR applications.

          xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/3.1

                              The last segment of the namespace specifies the version

                              of the AIR runtime required for this application to run.

          minimumPatchLevel - The minimum patch level of the AIR runtime required to run

                              the application. Optional.

-->

Message was edited by: KesherMedia.Com

francispotter
Participating Frequently
March 11, 2011

Great catch. I'll try changing that.

I don't remember uncommenting that block in the -app.xml file. Is it possible that Flash Builder is getting it wrong? (I'm using prerelease i6)

Participating Frequently
March 11, 2011

Yes, the Flash Builder i6 prerelease did get it wrong. (This has been fixed internally.)

francispotter
Participating Frequently
March 14, 2011

Thanks a bunch. That fixed the problem, and I would have never figured it out without your help.

francispotter
Participating Frequently
March 11, 2011

I'm having another problem related to AIR for Android and application versioning, that maybe someone subscribing to this thread can help with.

My app is in the Android market, but whenever a user installs it, the Market app tells them it requires updating.

They update, and it still says it requires updating.

If their phone is set to auto-update, it updates repeatedly.

It uses AIR 2.6 for Android, and other than setting the versionNumber in the -app.xml file, I haven't really done much with respect to versioning.

I notice that somewhere along the line (maybe in the packager) the prefix "air." got added to my application ID.

Here's the app: https://market.android.com/details?id=air.com.hg94.seti

We got some press yesterday so are getting a lot of attention and I'd really like to fix this bug. Thanks.

Participating Frequently
March 11, 2011

We've seen this when there are missing namespace prefixes in the Android section of the application descriptor.

Specifically, when using:

<manifest installLocation="auto">

instead of:

<manifest android:installLocation="auto">



francispotter
Participating Frequently
February 28, 2011

There is some weird compatability issues here. It appears that AIR requires a version code of the form 999.999.999, with the 2nd and 3rd parts optional, while the Android Market requires a single 32-bit integer. The net result is that your version code has to be simply of the form "999" and you're limited to 999 versions of your AIR for Android application. Or at least, that's as much as I can figure out.

Participating Frequently
February 28, 2011

On Android, the AIR version a.b.c is translated to the Android version code using the formula: a*1000000 + b*1000 + c

So any number valid in AIR should also be valid for Android.

francispotter
Participating Frequently
February 28, 2011

Thanks! That's helpful to know, and reasonably sensible.

Participant
December 13, 2010

umm, strange

I tried about 8 different ways and couldnt get it to work

I tried one last time and it worked. The only difference this time was Flex Builder was closed.

/me shrugs

Participating Frequently
December 15, 2010

The value of versionNumber in the AIR application descriptor is used as the versionCode in the

Android manifest. You should not be able to use a versionNumber value which isn't a valid versionCode.

MetaboyCorrect answer
Inspiring
December 17, 2010

Hi

There are some properties in the andriod manifest which you can't set directly.  The AIR packager sets them from you Application-XML descriptor file. In the case of the VersionCode you need to set the 'versionNumber' in your Application-XML file.  See p145 of the buildingAirApplications.pdf document which I think can download with the AIR SDK. :

"Content

The version number can contain a sequence of up to three integers separated by periods. Each integer must be a number between 0 and 999 (inclusive).

Examples

<versionNumber>1.0.657</versionNumber>

<versionNumber>10</versionNumber>

<versionNumber>0.01</versionNumber>"

My guess is that your version number is breaking the rule above ?