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.
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.
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.
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.
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.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With