无法在Visual Studio 2015中的Cordova项目中构建和创建apk文件

时间:2015-11-22 07:47:45

标签: visual-studio-2015 visual-studio-cordova apache-cordova

在visual studio 2015当我尝试创建apk文件时,我收到以下错误:

Severity    Code    Description Project File    Line
Error       cmd: Command failed with exit code 1    BlankCordovaApp2
Visual Studio 2015\Projects\Test Projects\BlankCordovaApp2\BlankCordovaApp2\
ERROR building one of the platforms 1`

这是我的输出:

Error code 1 for command: cmd with args: /s /c 
""C:\Users\Programming\Documents\Visual Studio 2015\Projects\Test 
Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\gradlew"
cdvBuildDebug -b "C:\Users\Programming\Documents\Visual Studio 2015\Projects\Test 
Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\build.gradle" -
Dorg.gradle.daemon=true" (TaskId:11)
1>  Command finished with error code 1: cmd /s /c  
""C:\Users\Programming\Documents\Visual Studio 2015\Projects\Test 
Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\cordova\build.bat" -
-debug "--buildConfig=C:\Users\Programming\Documents\Visual Studio 
2015\Projects\Test Projects\BlankCordovaApp2\BlankCordovaApp2\build.json"" 
(TaskId:11)
1>ERROR building one of the platforms : error : cmd: Command failed with exit    
code 1
1>  You may not have the required environment or OS to build this project   
(TaskId:11)
1>MDAVSCLI : error : cmd: Command failed with exit code 1
1>Done executing task "MdaVsCli" -- FAILED. (TaskId:11)
1>Done building target "BuildMDA" in project "BlankCordovaApp2.jsproj" -- FAILED.: (TargetId:11)

<小时/> 我也没有任何问题地打开了SDK管理器并重新安装了nodejs。

1 个答案:

答案 0 :(得分:0)

尝试从命令行运行构建(或者可能增加输出窗口的详细级别)。您应该从失败的命令行中获得更详细的错误。

在SDK管理器中,您确定安装了显示的所有可用更新吗?您是否在应用中安装了可能需要其他库(如Play服务?)的新插件?