我刚刚安装了cordova工具,但它没有构建......添加了一个空白的应用程序项目并点击构建
获得以下错误/输出
如果您将以下内容粘贴到记事本中以获得更好的效果
,那就太好了1>------ Build started: Project: BlankCordovaApp8, Configuration: Debug Android ------ 1>Build started 2/12/2016 5:12:47 PM. 1>Building with tools version "12.0". 1>Target "_CheckForInvalidConfigurationAndPlatform" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (entry point): 1>Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ). 1>Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ). 1>Using "Message" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 1>Task "Message" 1> Configuration=Debug 1>Done executing task "Message". 1>Task "Message" 1> Platform=Android 1>Done executing task "Message". 1>Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('bin\Android\Debug\' != '' and !HasTrailingSlash('bin\Android\Debug\')). 1>Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('bld\' != '' and !HasTrailingSlash('bld\')). 1>Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('bld\Android\Debug\' != '' and !HasTrailingSlash('bld\Android\Debug\')). 1>Done building target "_CheckForInvalidConfigurationAndPlatform" in project "BlankCordovaApp8.jsproj". 1>Target "EntityDeploy" skipped, due to false condition; ('@(EntityDeploy)' != '') was evaluated as ('' != ''). 1>Target "BeforeBuild" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "Build" depends on it): 1>Done building target "BeforeBuild" in project "BlankCordovaApp8.jsproj". 1>Target "CoreBuild" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "Build" depends on it): 1>Done building target "CoreBuild" in project "BlankCordovaApp8.jsproj". 1>Target "CreateTfsBuildInfoResource" skipped, due to false condition; ( $(AddBuildInfoToAssembly)==true ) was evaluated as ( false==true ). 1>Target "AfterBuild" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "Build" depends on it): 1>Done building target "AfterBuild" in project "BlankCordovaApp8.jsproj". 1>Target "BuildOnlySettings" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "Build" depends on it): 1>Done building target "BuildOnlySettings" in project "BlankCordovaApp8.jsproj". 1>Target "PreComputeCompileTypeScript" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "CompileTypeScript" depends on it): 1>Using "VsTsc" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\TypeScript.tasks.dll". 1>Task "VsTsc" 1> C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.exe --sourcemap --target ES5 --locale en-US COMPUTE_PATHS_ONLY 1>Done executing task "VsTsc". 1>Using "AssignTargetPath" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 1>Task "AssignTargetPath" 1>Done executing task "AssignTargetPath". 1>Done building target "PreComputeCompileTypeScript" in project "BlankCordovaApp8.jsproj". 1>Target "CompileTypeScript" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "BuildRipple" depends on it): 1>Skipping target "CompileTypeScript" because it has no outputs. 1>Though the target has declared its outputs, the output specification only references empty properties and/or empty item lists. 1>Done building target "CompileTypeScript" in project "BlankCordovaApp8.jsproj". 1>Target "PreComputeCompileTypeScript" skipped. Previously built successfully. 1>Target "CompileTypeScript" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "TrackJsChanges" depends on it): 1>Skipping target "CompileTypeScript" because it has no outputs. 1>Though the target has declared its outputs, the output specification only references empty properties and/or empty item lists. 1>Done building target "CompileTypeScript" in project "BlankCordovaApp8.jsproj". 1>Target "TrackJsChanges" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "BuildRipple" depends on it): 1>Task "Message" 1> GeneratedJavascript= 1>Done executing task "Message". 1>Using "MakeDir" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 1>Task "MakeDir" 1> Creating directory "bld\Ripple\Android\Debug". 1>Done executing task "MakeDir". 1>Using "MdaTrackJsChanges" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.dll". 1>Task "MdaTrackJsChanges" 1>Done executing task "MdaTrackJsChanges". 1>Task "MdaTrackJsChanges" skipped, due to false condition; ('$(DebuggerFlavor)' != '' AND $(DebuggerFlavor.Substring(0,6)) != 'Ripple') was evaluated as ('RippleNexus' != '' AND Ripple != 'Ripple'). 1>Done building target "TrackJsChanges" in project "BlankCordovaApp8.jsproj". 1>Target "PrepareForRippleRequirements" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "BuildRipple" depends on it): 1>Building target "PrepareForRippleRequirements" completely. 1>Output file "bld\Debug\platforms\android\assets\www\config.xml" does not exist. 1>Using "CallTarget" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 1>Task "CallTarget" 1>Target "EnsureNodeJsRequirementsAreAtCorrectVersion" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "PrepareForRippleRequirements" depends on it): 1>Task "Error" skipped, due to false condition; ($(MDAPropertiesEvaluated) == 'true' And $(NodeJsDir) == '') was evaluated as (true == 'true' And C:\Program Files\nodejs\ == ''). 1>Task "Error" skipped, due to false condition; ($(MDAPropertiesEvaluated) == 'true' And $(MDAVsixDir) == '') was evaluated as (true == 'true' And C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\KRNXWMFK.0J3
== ''). 1>Task "Error" skipped, due to false condition; ($(MDAPropertiesEvaluated) == '' And $(NodeJsDir) == '') was evaluated as (true == '' And C:\Program Files\nodejs\ == ''). 1>Task "Error" skipped, due to false condition; ($(MDAPropertiesEvaluated) == '' And $(MDAVsixDir) == '') was evaluated as (true == '' And C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\KRNXWMFK.0J3
== ''). 1>Task "Error" skipped, due to false condition; (!Exists('$(NodeJsDir)') Or !Exists('$(NodeJsDir)\node.exe')) was evaluated as (!Exists('C:\Program Files\nodejs\') Or !Exists('C:\Program Files\nodejs\\node.exe')). 1>Task "Error" skipped, due to false condition; (!Exists('$(MDAVsixDir)') Or !Exists('$(MDAVsixDir)\packages\vs-mda')) was evaluated as (!Exists('C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO
12.0\COMMON7\IDE\EXTENSIONS\KRNXWMFK.0J3') Or !Exists('C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO
12.0\COMMON7\IDE\EXTENSIONS\KRNXWMFK.0J3\packages\vs-mda')). 1>Task "CallTarget" 1>Target "InstallMDATargets" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "EnsureNodeJsRequirementsAreAtCorrectVersion" depends on it): 1>Using "RunMdaTargetsInstall" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.dll". 1>Task "RunMdaTargetsInstall" 1> c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8>call "C:\Program Files\nodejs\"\nodevars.bat 1> Your environment has been set up for using Node.js 5.4.1 (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\KRNXWMFK.0J3\packages\vs-mda 1> ------ Name from source package.json: vs-mda 1> ------ Version from source package.json: 0.1.76 1> ------ Current globally installed version:
0.1.76 1> ------ Package already installed globally at correct version. 1>Done executing task "RunMdaTargetsInstall". 1>Task "CallTarget" 1>Target "MDACleanAfterInstall" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "InstallMDATargets" depends on it): 1>Task "CallTarget" 1>Target "CleanCordovaDeploy" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets" from project "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\BlankCordovaApp8.jsproj" (target "MDACleanAfterInstall" depends on it): 1>Using "RemoveDir" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 1>Task "RemoveDir" 1> Directory "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\\bld\Debug\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin" doesn't exist. Skipping. 1>Done executing task "RemoveDir". 1>Task "Error" skipped, due to false condition; (@(CordovaDeployDirs) != @(DeletedDirectories)) was evaluated as (c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\\bld\Debug\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin != c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\\bld\Debug\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin). 1>Done building target "CleanCordovaDeploy" in project "BlankCordovaApp8.jsproj". 1>Done executing task "CallTarget". 1>Using "CreateItem" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 1>Task "CreateItem" 1>Done executing task "CreateItem". 1>Using "Delete" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 1>Task "Delete" 1> Deleting file "c:\users\kundran\documents\visual studio 2013\Projects\BlankCordovaApp8\BlankCordovaApp8\\bld\Android\Debug\changeList.json". 1>Done executing task "Delete". 1>Task "RemoveDir" skipped, due to false condition; (Exists('%(Identity)')) was evaluated as (Exists('')). 1>Done building target "MDACleanAfterInstall" in project "BlankCordovaApp8.jsproj". 1>Done executing task "CallTarget". 1>Task "Error" skipped, due to false condition; ($(MDAInstallErrorCode) != '0' And $(MDAInstallErrorCode) != '-17') was evaluated as (-17 != '0' And -17 != '-17'). 1>Done building target "InstallMDATargets" in project "BlankCordovaApp8.jsproj". 1>Done executing task "CallTarget". 1>Done building target "EnsureNodeJsRequirementsAreAtCorrectVersion" in project "BlankCordovaApp8.jsproj". 1>Done executing task "CallTarget". 1>Using "MdaVsCli" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.dll". 1>Task "MdaVsCli" 1> C:\WINDOWS\system32\cmd.exe /s /c " C:\Users\kundran\AppData\Roaming\npm\vs-cli.cmd prepare --platform Android --configuration Debug --projectDir . --projectName BlankCordovaApp8 --npmInstallDir C:\Users\kundran\AppData\Roaming\npm
--language en-US" 1> 'C:\Users\kundran\AppData\Roaming\npm\vs-cli.cmd' is not recognized as an internal or external command, 1> operable program or batch file. 1>Done executing task "MdaVsCli" -- FAILED. 1>Done building target "PrepareForRippleRequirements" in project "BlankCordovaApp8.jsproj" -- FAILED. 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:01.99
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
答案 0 :(得分:0)
这应该在这些工具的最新版本中修复,作为Visual Studio 2015的一部分包含在内。但是,如果您必须继续使用VS 2013,则可能与以下帖子中描述的问题相同:
\npm\node_modules\vs-mda\vs-cli is not recognized as an internal or external command
在该页面的答案中,这是一个适合某人的答案:
我已经通过删除解决了
C:\Users\yourUserName\AppData\Roaming\npm\node_modules\vs-mda\node_modules\*.*
和C:\Users\yourUserName\AppData\Roaming\npm-cache\*.*
然后在cmd我去了
C:\Users\Miquel\AppData\Roaming\npm\node_modules\vs-mda
并跑了:npm install