Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11252] Android: Entries in tiapp.xml do not replace stock values in generated AndroidManifest.xml

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2013-03-15T22:48:24.000+0000
Affected Version/sRelease 2.1.2, Release 2.1.3, Release 3.0.0
Fix Version/s2013 Sprint 06 Core, 2013 Sprint 06
ComponentsAndroid, Tooling
Labelsinsight, triage
ReporterTim Poulsen
AssigneeAllen Yeung
Created2012-10-03T20:14:51.000+0000
Updated2017-03-30T17:35:21.000+0000

Description

Android manifest changes in the tiapp.xml file do not replace the "stock" manifest entries created by the build process. Instead, the stock entries are copied after the custom entries, overriding the customizations.

Steps to reproduce

Create a default Ti project targeting Android

Build the app (for emulator or device, doesn't matter)

Open tiapp.xml, view the XML source

Change the
    <android xmlns:android="http://schemas.android.com/apk/res/android">
    	<manifest>
    	</manifest>
    </android>

Open /builds/android/AndroidManifest.xml and copy the and tags that follow the comment

Paste the copied text into the tiapp.xml between the tags

Edit the pasted in code to remove |orientation from each of the attributes

To each of those tags, add android:screenOrientation="portrait" to force portrait orientation in the app

Save and build the app

Open /builds/android/AndroidManifest.xml. It will have both your customized entries followed by the generated stock entries. As a result, the app will display in both portrait and landscape orientation.

Expected results

Changes in tiapp.xml would override the stock/generated AndroidManifest.xml values

Actual results

Stock/generated AndroidManifest values pasted in after custom entries, negating the effect of the custom entries. This is likely a regression as it used to work properly. The tiapp.xml customization technique is taught in the ATMD training course.

Comments

  1. Tim Poulsen 2013-03-14

    This is still not working with the 3.0.0.GA SDK, 3.0.2.201302191606 Studio, and 3.0.24 CLI.
  2. Ingo Muschenetz 2013-03-14

    @Tim--when did it last work?
  3. Lee Morris 2017-03-30

    Closing ticket as invalid.

JSON Source