# \[Android\] "Extra Tags for node" adds attributes, not tags

**URL:** <https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666>\
**Category:** Mobile\
**Tags:** Android-Packaging, deployment, manifest, project-settings, unreal-engine, Android, question\
**Created:** [September 10, 2015, 5:12am UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666 "2015-09-10T05:12:38Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohoon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rohoon](https://forums.unrealengine.com/u/rohoon)\
**Post date:** [September 10, 2015, 5:12am UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/1 "2015-09-10T05:12:38Z")

</div>

I’m trying to add a `< supports-screens >` tag as a child of `< manifest >` in the generated `AndroidManifest.xml` file.

There is a field called “Extra Tags for \< manifest \>`` node” that sounds like it should do this, but it actually adds _attributes_ (i.e. `attribute="value"` pairs) to the node, not tags.

Trying to add a tag in this section results in malformed XML like this:

```
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.mycompany.mygamename"
          <supports-screens android:smallScreens="false" android:normalScreens="false" android:largeScreens="false" android:xlargeScreens="true"/>
          android:versionCode="1"
          android:versionName="0.1">

```

Aside from the fact that this field should be renamed to “Extra attributes for `< manifest >` node” and a new field “Child nodes/tags for `< manifest >` node” should be created, is there any way for me to add extra child nodes to the `< manifest >` node?

---

<div class="post-metadata">

**Author:** ![rohoon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rohoon](https://forums.unrealengine.com/u/rohoon)\
**Post date:** [October 22, 2015, 1:46am UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/2 "2015-10-22T01:46:48Z")

</div>

Epic, can I get a response on this?

If anyone is interested in how to get extra actual tags (not attributes) under the `< manifest >` node, you can actually hack the “Extra permissions” section to inject XML. Just add a valid permission (I chose `READ_EXTERNAL_STORAGE`), then add a double quote and closing tag `"/>` to complete the permission node, then add your XML, then leave off your last double quote and closing tag `"/>` as that will be added by Unreal.

The text I added in one of the “Extra permissions” slots was:

```
android.permission.READ_EXTERNAL_STORAGE"/> <supports-screens android:smallScreens="false" android:normalScreens="false" android:largeScreens="true" android:xlargeScreens="true" android:requiresSmallestWidthDp="600

```

Massive hack, but this was the only way I could find to add things like `< supports-screens >` tags.

---

<div class="post-metadata">

**Author:** ![MongooseJV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MongooseJV](https://forums.unrealengine.com/u/MongooseJV)\
**Post date:** [March 26, 2016, 1:01am UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/3 "2016-03-26T01:01:32Z")

</div>

I’m surprised there hasn’t been any answer to this. What is the preferred method as I’m trying to add the following (to support tablets)

```
<supports-screens android:largeScreens="true" android:xlargeScreens="true" />
```

---

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [March 29, 2016, 3:03pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/4 "2016-03-29T15:03:33Z")

</div>

This bug sucks. Fortunately there is APL (Android Plugin Language), wich can be used to modify manifest (and more).

---

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [March 30, 2016, 11:12am UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/5 "2016-03-30T11:12:41Z")

</div>

You should confrim that in 4.10 (I confirm, but without details now) and repost it in Bug Reports category. It will helps others and might be fixed in 4.11

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f1d9eaa9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f1d9eaa9](https://forums.unrealengine.com/u/anonymous_user_f1d9eaa9)\
**Post date:** [April 26, 2016, 9:51am UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/6 "2016-04-26T09:51:08Z")

</div>

Put a file named ManifestRequirementsOverride.txt in the [YOUR GAME]/Build/Android folder as described at [Removing Android app permissions - Programming & Scripting - Epic Developer Community Forums](https://answers.unrealengine.com/questions/318771/removing-android-app-permissions.html)  
This is apparently a temporary solution.

Everything inside ManifestRequirementsOverride.txt gets put inside the manifest tag.  
Note that this replaces any existing requirements.  
As of 4.11 the requirements are:

```
<!-- Entery your SDK versions here as required -->
<uses-sdk android:minSdkVersion=\"21\" android:targetSdkVersion=\"21\"/>
<uses-feature android:glEsVersion=\"0x00020000"\" android:required=\"true\" /> <!-- or 0x00030000 -->
  
<uses-permission android:name=\"android.permission.INTERNET\"/>
<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>
<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>"
<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>"
<uses-permission android:name=\"com.android.vending.CHECK_LICENSE\"/>"
<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>"
<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>"
<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>"
<uses-permission android:name=\"android.permission.VIBRATE\"/>"
    
<!-- and billing if used -->
<uses-permission android:name=\"com.android.vending.BILLING\"/>

```

The more technically inclined might want to look at the C# code in UnrealEngine\Engine\Source\Programs\UnrealBuildTool\Android\UEDeployAndroid.cs (around line 1923 in the GenerateManifest function).

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [May 31, 2016, 12:07pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/7 "2016-05-31T12:07:44Z")

</div>

Bumping. This is still a problem, and so far there is no official word on the matter. Causing us real headaches at the moment!

Additionally, there are duplicate keys being generated in the manifest which means debugging Android is literally impossible right now. I’m following this guide: [http://zompi.pl/unreal-engine-4-debugging-on-android/](http://zompi.pl/unreal-engine-4-debugging-on-android/)

---

<div class="post-metadata">

**Author:** ![rohoon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rohoon](https://forums.unrealengine.com/u/rohoon)\
**Post date:** [May 31, 2016, 12:11pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/8 "2016-05-31T12:11:08Z")

</div>

Did you read the workaround I posted in a comment to the original question?

---

<div class="post-metadata">

**Author:** ![rohoon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rohoon](https://forums.unrealengine.com/u/rohoon)\
**Post date:** [May 31, 2016, 12:11pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/9 "2016-05-31T12:11:30Z")

</div>

Did you read the workaround I posted in a comment to the original question?

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [May 31, 2016, 3:39pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/10 "2016-05-31T15:39:07Z")

</div>

I did, but don’t fully understand how you did it. I’m looking at the packaging settings in the Project Settings, not seeing where you’ve added what you did.

Irritating that we can’t just edit the XML directly 😕

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [May 31, 2016, 3:48pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/11 "2016-05-31T15:48:23Z")

</div>

Additionally, it doesn’t work anymore. I was able to install it on a phone despite adding the tags you put above.

---

<div class="post-metadata">

**Author:** ![rohoon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rohoon](https://forums.unrealengine.com/u/rohoon)\
**Post date:** [May 31, 2016, 9:48pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/12 "2016-05-31T21:48:25Z")

</div>

The `< supports-screens >` tag only comes into effect on the Play store - you can still deploy to a phone manually.

---

<div class="post-metadata">

**Author:** ![rohoon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rohoon](https://forums.unrealengine.com/u/rohoon)\
**Post date:** [May 31, 2016, 9:58pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/13 "2016-05-31T21:58:39Z")

</div>

The hack works by injecting your XML into the “Extra Permissions” section rather than using the “Extra tags for application node” section.

When you add a permission, the XML generator generates `< uses-permission android:name="`, then inserts the permission you specified, then closes the tag by adding `" />` to the end. What the hack does is prematurely closes the `uses-permission` tag, then adds your XML (which is missing the final quotation mark and closing tag), then lets the generator add `" />`, resulting in valid XML.

The generated XML looks like this, and appears below the rest of the `uses-permission` tags:

```
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  <supports-screens android:smallScreens="false" android:normalScreens="false" android:largeScreens="true" android:xlargeScreens="true" android:requiresSmallestWidthDp="600" />
```

---

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [June 1, 2016, 5:23am UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/14 "2016-06-01T05:23:47Z")

</div>

Did you used my solution? It’s powerfull method, which might solve yours any other needs.

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [June 18, 2016, 3:29pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/15 "2016-06-18T15:29:06Z")

</div>

You’re right, this does seem to work.

Horrible hack though ☹ Man this needs fixing.

---

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [June 20, 2016, 9:05am UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/16 "2016-06-20T09:05:10Z")

</div>

Just use APL and you can modify any node you want using platform dependent variables

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [June 20, 2016, 6:43pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/17 "2016-06-20T18:43:21Z")

</div>

You can also use ManifestRequirementsAdditions.txt which just adds to the requirements without requiring the full section be replaced like with ManifestRequirementsOverride.txt.

---

<div class="post-metadata">

**Author:** ![rohoon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rohoon](https://forums.unrealengine.com/u/rohoon)\
**Post date:** [June 20, 2016, 10:49pm UTC](https://forums.unrealengine.com/t/android-extra-tags-for-node-adds-attributes-not-tags/331666/18 "2016-06-20T22:49:45Z")

</div>

Good tip, thanks Chris 🙂
