5

I tried to use android:versionName=">0.3" in my AndroidManifest.xml file (as a note to myself to bump it on the next release), but the NDK didn't like it:

Invalid attribute name: 
C:/Android/android-ndk-r8d/build/gmsl/__gmsl:512: *** non-numeric second argument to `wordlist' function: ''.  Stop.

And yet, the docs seem to indicate that I can make my versionName whatever I want:

android:versionName

The version number shown to users. This attribute can be set as a raw string or as a reference to a string resource. The string has no other purpose than to be displayed to users. The versionCode attribute holds the significant version number used internally.

Nolan Amy
  • 10,785
  • 5
  • 34
  • 45
  • An interesting tidbit from the GNU Make Standard Library (file `gmsl/__gmsl`): `Integers [are] represented by lists with the equivalent number of x's. For example the number 4 is x x x x. The maximum integer that the library can handle as _input_ is __gmsl_input_int which is defined here as 65536` ...fascinating! – Nolan Amy Feb 10 '13 at 22:09
  • I tried using the same `versionName` as you in my project and didn't get any error. Maybe it is a limitation of the NDK ? – nicopico Feb 10 '13 at 22:12
  • @nicopico Yes, I only get the NDK error. Do you have an NDK project you can try it with? – Nolan Amy Feb 10 '13 at 22:13
  • I made some test, it seems the '>' character is invalid for the NDK. You are not limited to number though, as 'version 0.3' seems to work – nicopico Feb 10 '13 at 22:27
  • Yeah, I experimented with some other special characters as well, like '+' and '?'. Those seemed to be fine. – Nolan Amy Feb 10 '13 at 22:37

4 Answers4

4

Turns out the NDK uses some interesting GNU Make integer encoding functions on the versionName string. It seems these can handle letters and some special characters (e.g., ?, -, /, \, and +) but not others (e.g., < and >).

I've opted to append a .0 to the end of my versionName to indicate that a bump is needed on the next release. In this case, I'm using 0.3.0.

(for more on GMSL's Integer Arithmetic Functions, see Line 494 of the source)

Update:

We've switched to simply appending a + character – 0.3+. Works nicely.

Nolan Amy
  • 10,785
  • 5
  • 34
  • 45
1

I used the command dos2unix AndroidManifest.xml and it clears up the error for me. I hope that helps.

How to build Openssl for Android on Windows with ndk8?

Community
  • 1
  • 1
luckyreed76
  • 185
  • 2
  • 8
0

Technically , there are no restrictions about what you put there.

However , please make it as easy to understand as possible , especially for final versions .

For alpha/beta/RC/preview versions , you can put whatever you wish, but still , put some kind of version numbers.

android developer
  • 114,585
  • 152
  • 739
  • 1,270
  • Hmmm... "no restrictions about what you put there"... How do you explain the NDK error I'm getting? – Nolan Amy Feb 10 '13 at 22:21
  • can you use : android:versionName="0.3-alpha" instead ? The normal android framework (java) doesn't complain about either of those . You might be able to make the ndk ignore this but sadly i'm not so familiar with the ndk . I know for sure that there are apps that have additional text in the version name . I've tried setting the ">1.0" value and it worked fine for normal android apps. – android developer Feb 10 '13 at 22:33
  • I think that would work; I'm going with `.0` as my "to-increment" flag. Thanks. – Nolan Amy Feb 13 '13 at 20:16
0

Simply add <uses-sdk android:minSdkVersion="8" /> before the application tag.

That worked for me.

Nolan Amy
  • 10,785
  • 5
  • 34
  • 45
ZiviMagic
  • 1,034
  • 2
  • 10
  • 25