Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2973] Android: attributes put on "manifest" element in tiapp.xml are ignored unless child elements also included

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:00:35.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M07
ComponentsAndroid
Labelsandroid, defect, release-1.5.2, release-1.6.0, reported-1.5.0
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T03:33:57.000+0000
Updated2011-04-17T02:00:35.000+0000

Description

cf http://developer.appcelerator.com/question/103121">http://developer.appcelerator.com/question/103121

If you have an "android" section in tiapp.xml that looks like this:


    <android xmlns:android="http://schemas.android.com/apk/res/android">
        <manifest android:versionCode="2" android:versionName="2"/>
    </android>

... then those custom attributes that you put for android:versionCode and android:versionName will be ignored. If, however, you also put in a custom child element to for the "manifest" element, it will work. Such as this:

 <android xmlns:android="http://schemas.android.com/apk/res/android">
        <manifest android:versionCode="2" android:versionName="2">
            <uses-sdk android:minSdkVersion="4" />
        </manifest>
    </android>

So to test this failcase and its resolution, use the first example above -- just create a manifest entry with those android:versionCode and android:versionName attributes, setting them both to "2". Then build your app. After it's done launching, open the build/android/AndroidManifest.xml file (which is generated during the build process), and if you look at the "manifest" element in there you'll see that the versionCode and versionName are still set to 1 in the failing version. In the fixed version, they should successfully get set to 2.

Comments

  1. Bill Dawson 2011-04-15

    (from [8df1f283c78cf0bf98357f408acf0fdca5f18cea]) [#2973 state:fixed-in-qa] Make sure custom attributes on manifest element in tiapp.xml get processed https://github.com/appcelerator/titanium_mobile/commit/8df1f283c78cf0bf98357f408acf0fdca5f18cea"> https://github.com/appcelerator/titanium_mobile/commit/8df1f283c78c...

  2. Bill Dawson 2011-04-15

    (from [704b34573dab4150d60d63f6ae7f80f86b17db61]) [#2973 state:fixed-in-qa] Make sure custom attributes on manifest element in tiapp.xml get processed https://github.com/appcelerator/titanium_mobile/commit/704b34573dab4150d60d63f6ae7f80f86b17db61"> https://github.com/appcelerator/titanium_mobile/commit/704b34573dab...

  3. Bill Dawson 2011-04-15

    (from [891214956cc03c205dc1bf60db81836c0505eee7]) [#2973 state:fixed-in-qa] be sure custom attributes on manifest element in tiapp.xml get processed https://github.com/appcelerator/titanium_mobile/commit/891214956cc03c205dc1bf60db81836c0505eee7"> https://github.com/appcelerator/titanium_mobile/commit/891214956cc0...

  4. Opie Cyrus 2011-04-15

    verified emulator 2.2

JSON Source