Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does android:versionName have to be numeric (of the form 0.0.0, etc.)?

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.

like image 322
Nolan Amy Avatar asked Feb 10 '13 21:02

Nolan Amy


People also ask

What is versionCode and versionName in Android?

versionCode — A positive integer used as an internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users; that number is set by the versionName setting, below.

What is version number in Android app?

The app version that displays in the app store, and it is the first number that is displayed in MobileFirst Quality Assurance. In Android, this number is the versionName. In iOS, this number is the CFBundleShortVersionString. For example, if the version that is displayed is 1.4 (1.0), the release version number is 1.4.

How do I give a version name?

Version code & version name As you may know, on android you have to define two version fields for an app: version code ( android:versionCode on your AndroidManifest. xml ) . The version code is an incremental integer value that represents the version of the application code.


2 Answers

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.

like image 90
Nolan Amy Avatar answered Oct 12 '22 22:10

Nolan Amy


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?

like image 20
luckyreed76 Avatar answered Oct 12 '22 20:10

luckyreed76