Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4818] Android manifest in tiapp.xml does not transfer completely to AndroidManifest.xml AND using a custom manifest does not work

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2017-02-23T14:27:45.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, manifest, titanium
ReporterMichael Kazmier
AssigneeShak Hossain
Created2017-02-22T17:59:45.000+0000
Updated2017-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.

Comments

  1. Michael Kazmier 2017-02-22

    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 in tiapp.xml it works as desired. So, for the first bug perhaps all that is needed is a documentation update to explain to a user how to do this?
  2. Sharif AbuDarda 2017-02-23

    This should be the ideal case. You should put all your activity under single manifest section in tiapp.xml. Thanks.
  3. Sharif AbuDarda 2017-02-23

    As documented "Most elements inside the will be added as children to the element inside of AndroidManifest.xml at build time" in http://docs.appcelerator.com/platform/latest/#!/guide/Maintaining_a_Custom_AndroidManifest.xml
  4. Michael Kazmier 2017-02-23

    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: http://schemas.android.com/apk/res/android"> http://schemas.android.com/apk/res/android" package="com.kaztopia.multiactive" android:versionCode="1" android:versionName="1.0"> The above does not work, just check the compiled AndroidManifest.xml for the SecondActivity. Now try this one: http://schemas.android.com/apk/res/android"> http://schemas.android.com/apk/res/android" package="com.kaztopia.multiactive" android:versionCode="1" android:versionName="1.0">
  5. Dirlei DionĂ­sio 2017-03-02

    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.

JSON Source