Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16674] Android build/package: versionName loses zeros after the decimal

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-05-23T20:54:31.000+0000
Affected Version/sn/a
Fix Version/s2014 Sprint 10, 2014 Sprint 10 Tooling, Release 3.3.0
ComponentsAndroid, Tooling
Labelsandroid, build, defect, module_android, qe-testadded, titanbeta
ReporterShawn Lipscomb
AssigneeChris Barber
Created2014-03-21T18:29:08.000+0000
Updated2014-08-05T20:52:51.000+0000

Description

When publishing an app to Google Play, if the versionName has trailing zeros (e.g. 3.0, 3.10), those zeros are lost by the build process, so that in AndroidManifest.xml, versionName comes out as, for example, 3 instead of 3.0. Example tiapp.xml snippet: {panel} http://schemas.android.com/apk/res/android"> {panel} You can see that versionName is set to "3.0", a string. In AndroidManifest.xml, you get this: {panel} http://schemas.android.com/apk/res/android" package="com.MyCompany.MyAppName" android:versionCode="15" android:versionName="*3*" android:installLocation="auto"> {panel} I noticed that in _build.js, versionName is sometimes being treated as a number, and sometimes as a string.

Comments

  1. Chris Barber 2014-05-16

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5691
  2. Tim Poulsen 2014-05-16

    Works as expected, trailing zeros are preserved.
  3. Samuel Dowse 2014-05-16

    Verified fixed on: Mac OSX 10.9.3 Appcelerator Studio, build: 3.3.0.201405121247 Titanium SDK, build: 3.3.0.v20140516130124 Titanium CLI: 3.3.0-alpha Alloy: 1.4.0-alpha Android versionName no longer removes trailing zeros.
    android:versionCode="15" android:versionName="3.0" android:installLocation="auto">
    Closing.

JSON Source