[TIMOB-11252] Android: Entries in tiapp.xml do not replace stock values in generated AndroidManifest.xml
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-03-15T22:48:24.000+0000 |
Affected Version/s | Release 2.1.2, Release 2.1.3, Release 3.0.0 |
Fix Version/s | 2013 Sprint 06 Core, 2013 Sprint 06 |
Components | Android, Tooling |
Labels | insight, triage |
Reporter | Tim Poulsen |
Assignee | Allen Yeung |
Created | 2012-10-03T20:14:51.000+0000 |
Updated | 2017-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.
Change the
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.
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
</manifest>
</android>
This is still not working with the 3.0.0.GA SDK, 3.0.2.201302191606 Studio, and 3.0.24 CLI.
@Tim--when did it last work?
Closing ticket as invalid.