【发布时间】:2015-01-23 12:09:39
【问题描述】:
我正在为 Visual Studio 2015 中的 Cordova 开发多设备混合应用解决方案。 由于某些原因,我正在使用 Grunt,所以我的解决方案中有一个“node-modules”文件夹,由于这个文件夹,我无法为 Android 构建。
解决方案是添加这个属性:
<property name="aapt.ignore.assets" value="&lt;dir&gt;node_*" />
在 Android 的 build.xml 中排除要内置的节点模块,但是 build.xml 文件是使用我的 Visual Studio 解决方案构建生成的,似乎无法在科尔多瓦 config.xml。
我也尝试在 /res/native/android/ 中创建一个 build.xml 文件(相当于之前 MDHA 的 CTP 中的 /res/cert/android/),但没有进行任何合并。
有什么想法吗?
【问题讨论】:
-
您是否尝试将 build.xml 放在 merges/android 文件夹中?您可以使用 here 下
Platform Specific Content下记录的合并文件夹将特定于平台的内容添加到项目中 -
我试图在 merges/android 和 /merges/android/scripts 中创建我的 build.xml,但这不起作用。现在(没有我的 build.xml)我不知道为什么我可以构建,但显然我的 node_module 文件夹在构建中,我的 pkg 大了 5 个月。实际上,我正在尝试使用“custom_rules.xml”(构建前/构建后事件规则)来获得一些东西。
标签: android cordova node-modules multi-device-hybrid-apps visual-studio-2015