Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-315] Android: Build Doesn't Handle Version for AndroidManifest.xml

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:52:41.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsAndroid
Labelsandroid, defect
ReporterDon Thorp
AssigneeDon Thorp
Created2011-04-15T02:27:08.000+0000
Updated2011-04-17T01:52:41.000+0000

Description

The AndroidManifest.xml generator doesn't use the version from tiapp.xml for the string version. There currently doesn't exist a way to specify the integer version required by Android for the market in tiapp.xml.

Comments

  1. Don Thorp 2011-04-15

    The workaround is to use a custom android manifest for now.

  2. Jeff Haynie 2011-04-15

    i'm moving this to 1.5 so we can close this out but i think this is fixed?

  3. Don Thorp 2011-04-15

    We don't currently have a way for the developer to provide increment or set the versionCode. versionName should be what ever string they enter. Currently the only way to handle this is with a custom manifest file. Since we don't have project level settings yet.

    android:versionCode="1" android:versionName="1"

  4. Bill Dawson 2011-04-15

    #1594 accomplishes this for Titanium 1.5. Attributes put on the <android>&ltmanifest> element in tiapp.xml are carried over to the AndroidManifest.xml. So you could have, for example, the following in tiapp.xml:

       <?xml version="1.0" encoding="UTF-8"?>
       <ti:app xmlns:ti="http://ti.appcelerator.org">
       
       ...
       <android xmlns:android="http://schemas.android.com/apk/res/android">
       <manifest android:versionCode="5" android:versionName="5">
       <supports-screens 
         android:smallScreens="false"
         android:normalScreens="true"
         android:largeScreens="true"
         android:anyDensity="false"
       />
       <uses-sdk android:minSdkVersion="7" />
       </manifest>
       </android>
       ...
       </ti:app>
       

    Those android:versionXXX attributes will then find they're way on to the <manifest> in AndroidManifest.xml. (In this example, supports-screens and uses-sdk will also get set.)

JSON Source