2016-12-29 49 views
1

我在Windows 10家庭版中使用VS2015社区版更新3,最新的TACO和Ionic框架。VS2015构建不执行节点挂钩并且没有错误

我有一些before_prepare在config.xml中定义的Cordova钩子将一些文件复制到www/lib中。

我注意到,如果我从命令行调用cordova prepare或cordova build,但是当我执行Visual Studio构建时,它不会调用它们,我会调用它的挂钩。

有一段时间,它实际上是在我的文本编辑器中打开.js文件而不是执行。我发现一篇文章讨论了文件编码中的BOM如何抛弃Visual Studio,所以我确定所有这些.js文件都是ASCII编码。现在这些文件不会在Notepad ++中自动打开,但它们仍然不会执行并且没有错误。

我试过了,没有#!/ usr/bin/env节点在顶部。

当我做了调试版本的Android,我越来越没有像我看的时候我做的科尔多瓦CLI编译:

>------ Build started: Project: Wenzaa, Configuration: Debug Android ------ 
1> ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac 
1> ------ Name from source package.json: vs-tac 
1> ------ Version from source package.json: 1.0.42 
1> ------ Package already installed globally at correct version. 
1> ------ Cordova tools 6.1.1 already installed. 
1> ------ Build Settings: 
1> ------ Build Settings: 
1> ------ platformConfigurationBldDir: D:\MOBILEDEV\ionic\Wenzaa\Wenzaa\bld\Android\Debug 
1> ------ platformConfigurationBinDir: D:\MOBILEDEV\ionic\Wenzaa\Wenzaa\bin\Android\Debug 
1> ------ buildCommand: prepare 
1> ------ platform: Android 
1> ------ cordovaPlatform: android 
1> ------ configuration: Debug 
1> ------ cordovaConfiguration: Debug 
1> ------ projectName: Wenzaa 
1> ------ projectSourceDir: D:\MOBILEDEV\ionic\Wenzaa\Wenzaa 
1> ------ npmInstallDir: C:\Users\Jesse\AppData\Roaming\npm 
1> ------ language: en-US 
1> ------ Platform android already exists 
1> ------ Updating plugins 
1> ------ Currently installed plugins: [email protected],[email protected],[email protected],[email protected],[email protected] 
1> ------ Currently installed dependent plugins: 
1> ------ Currently configured plugins: 
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== 

我试图通过程序和功能面板修复Apache的工具科尔多瓦(“修理选项”)。不知道为什么,但它似乎我已经安​​装作为一个单独的包,以及通过Visual Studio组件安装的选项。这可能吗?

回答

1

在审查科尔多瓦Hooks Guide,似乎我已经分配before_prepare钩子,它实际上不应该在编译过程中运行。通过将它们移动到before_compile,它们将运行。但是,依赖包我不会经常更改,所以我可以将它们保留在before_prepare中,并且在/更新相关包时简单地使用cordova prepare CLI命令。

0

我现在打颇为相似一会儿东西,只是找到了一个解决方案,我不知道是否能适用于你。

为了构建后,没有停止“目前配置的插件:”我不得不选择无论是在那里“设备”来代替。另外我将该项目设置为启动项目。

现在,它通过构建,运行我的钩子和输出包!

希望这有助于你

+0

这是有道理的,因为它并不需要Android包在模拟器中运行,所以它不会建立它,除非你在调试设备上,还是在释放模式(你可以试试)。看到我下面的帖子也是如此。 – jessewolfe