[AC-4818] Android manifest in tiapp.xml does not transfer completely to AndroidManifest.xml AND using a custom manifest does not work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-02-23T14:27:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, manifest, titanium |
Reporter | Michael Kazmier |
Assignee | Shak Hossain |
Created | 2017-02-22T17:59:45.000+0000 |
Updated | 2017-03-02T12:21:29.000+0000 |
Description
We have added both intent filters and a second activity to the tiapp.xml but it does not fully transfer to the AndroidManifest.xml. As a work around, we followed the instructions here:
http://docs.appcelerator.com/platform/latest/#!/guide/Maintaining_a_Custom_AndroidManifest.xml
But first we received this error:
{{[ERROR] Detected legacy "/platform" directory in project directory.
[ERROR] Please move the "/platform" directory to "/app/platform" for Alloy 1.8.0 or later.
[ERROR] Alloy compiler failed}}
So we moved the custom AndroidManifest.xml to /app/platform/android/AndroidManifest.xml and we STILL could not get the custom manifest.
There is an example application here: https://github.com/DaKaZ/multiactive You can see the first activity in the tiapp.xml does not transfer. You can also see that if you create the custom manifest the auto generated manifest is used, not the custom.
We found an interesting work around for the first issue - the translation of the tiapp.xml into the AndroidManifest.xml. If you put the second Activity at the same level of the
This should be the ideal case. You should put all your activity under single manifest section in tiapp.xml. Thanks.
As documented "Most elements inside the
There are two problems with the documentation: 1. Declaring a second activity does not work as described 2. The completely custom AndroidManifest.xml does not work To recreate issue #1, try to use this android section:
I'm also having the second problem with SDK 6.0.1 in an Alloy Project, but I found a workaround: put the same custom AndroidManifest.xml in both directories: app/platform/android AND platform/android. The build process will use platform/android/AndroidManifest.xml and after that, will rewrite the entire folder by app/platform/android. I know, it's a weird workaround, but it works. I endorse the claim to have custom android manifest working without workarounds.