How to merge or override the build.xml for Android in phonegap / Cordova

可紊 提交于 2019-12-11 10:16:19

问题


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:


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.



来源:https://stackoverflow.com/questions/27127563/how-to-merge-or-override-the-build-xml-for-android-in-phonegap-cordova

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!