[TIMOB-26537] Android: Module "AndroidManifest.xml" <uses> elements overwrites "tiapp.xml" elements
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-12-27T19:49:57.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.0.0 |
Components | Android |
Labels | android, build, cli, manifest, module |
Reporter | Motiur Rahman |
Assignee | Yordan Banev |
Created | 2016-06-01T21:42:16.000+0000 |
Updated | 2019-01-15T17:58:17.000+0000 |
Description
Attachments
File | Date | Size |
---|---|---|
with_Map_Module_AndroidManifest.txt | 2016-06-01T21:42:03.000+0000 | 2432 |
Without_Map_Mdule_AndroidManifest.txt | 2016-06-01T21:39:54.000+0000 | 2073 |
updates ?
I found the problem: https://github.com/appcelerator/titanium_mobile/blob/master/android/cli/lib/AndroidManifest.js#L493 This loop will run multiple times (for each module) and adds the uses-features. If you have two uses-features in your tiapp.xml the output in the first run will be {noformat} tag: uses-feature, name: 0 { name: 'android.hardware.camera', required: false } tag: uses-feature, name: 1 { name: 'android.hardware.camera.focus', required: false } {noformat} Then when it adds the ti.map uses-features the first output is: {noformat} tag: uses-feature, name: 0 { glEsVersion: '0x00020000', required: true } {noformat} so this will overwrite the first item! Changing it to {noformat} this[tag][src[tag][name]] = src[tag][name]; {noformat} would fix the missing items but it will fail for elements that don't have a name like {noformat}
This is currently an Android P blocker and should definitely be fixed before 7.5.0 is released. Without this fix, no devices running Android P will be able to run apps that use Ti.Map because of MOD-2467. The (really bad) workaround we used for now is to inject it to the SDK manually, by copying the required
<uses-feature>
flag into:Replace with the version you are using of course.
PR: https://github.com/appcelerator/titanium_mobile/pull/10467
FR Passed. PR Merged.
Closing ticket. Fix verified in SDK version 8.0.0.v20190102142454 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/10467
This is NOT fixed. We just pulled down a fresh 8_0_X and still seeing the error described in MOD-2467.
Excuse me, the tag was misplaced! It seems to work fine now.