VS Cordova Apache错误

时间:2015-03-18 14:02:21

标签: apache cordova visual-studio-cordova

我使用Tools for Cordova构建了一个简单的电话应用程序。当我用Ripple - Nexus S进行测试时,应用程序工作正常。但现在我试图在三星Galaxy S2上测试应用程序。我插入设备并尝试在调试模式下使用设备配置进行构建。但是我收到了以下错误:

Error   2   cmd: Command failed with exit code 2    D:\Cordova\Apps\TestApp PhoneGap\TestApp PhoneGap\MDAVSCLI  1   1   TestApp PhoneGap


1>------ Build started: Project: TestApp PhoneGap, Configuration: Debug Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1>  GeneratedJavascript=
1>  D:\Cordova\Apps\TestApp PhoneGap\TestApp PhoneGap>call "C:\Program Files\nodejs\"\nodevars.bat 
1>  Your environment has been set up for using Node.js 0.12.0 (x64) and npm.
1>  ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\SCUXRJW3.ZUV\packages\vs-mda
1>  ------ Name from source package.json: vs-mda
1>  ------ Version from source package.json: 0.1.75
1>  ------ Current globally installed version: 0.1.75
1>  ------ Package already installed globally at correct version.
1>MDAVSCLI : error : cmd: Command failed with exit code 2
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

我尝试配置启用了USB调试的手机,然后尝试使用USB海量存储,但仍然相同。我还试图从Tools-> Option-> Apache Cordova工具中清除Cordova Cache,我仍然得到同样的错误。这是一张如果我不清楚我试图跑的图片:http://postimg.org/image/68crk94az/

感谢您的帮助!!

2 个答案:

答案 0 :(得分:1)

问题解决了.. 问题不在于名称。在安装Cordova for Visual Studio之前,我安装了一些组件并手动添加了路径。我删除了所有内容,然后我再次安装了Cordova,这没关系

答案 1 :(得分:0)

您的解决方案名称和项目名称“TestApp PhoneGap”包含一个SPACE,尝试在没有SPACE的情况下构建一个新的解决方案和新项目“TestAppPhoneGap”。

在我的情况下,我遇到了类似的问题,在删除空格后,构建成功了!