1
votes

I'm working on a Multi-devices Hybrid Apps solution for Cordova in Visual Studio 2015. I'm using Grunt for some reasons so there is a "node-modules" folder in my solution and I can't build for Android because of this folder.

The soluton is to add this property :

<property name="aapt.ignore.assets" value="&lt;dir&gt;node_*" />

in the build.xml for Android to exclude the node modules to be built in, but the build.xml file is generated with my visual studio solution build and it seems to have no way to specify the "ignore" property in the cordova config.xml.

I also tried to create a build.xml file in /res/native/android/ ( equivalent to the /res/cert/android/ in the previous CTP of MDHA ) but no merges was done.

Any idea ?

1
Did you try putting your build.xml within the merges/android folder? You can add platform specific content to your project using the merges folder as documented here under Platform Specific ContentAvani
I tried to create my build.xml in the merges/android and in the /merges/android/scripts, that doesn't work. Now ( without my build.xml ) I don't know why I can build but obviously my node_module folder is in the build and my pkg is 5 mo bigger. Actually I'm trying to get something with a "custom_rules.xml" (pre/post-build event rules).Kevin ALBRECHT

1 Answers

1
votes

Try adding this to \res\native\android\ant.properties:

aapt.ignore.assets=<dir>node_*

This file appears to be imported into build.xml (which is generated) so it provides a roundabout way of getting your value in there.