在构建cordova Windows应用程序时出现错误

时间:2018-07-05 06:18:26

标签: windows cordova visual-studio-2015 build

1> ------开始构建:项目:InsightsGoApp,配置:调试Windows-x86 ------     1>您的环境已设置为使用Node.js 8.11.3(x64)和npm。     1> ------确保从源软件包目录正确地全局安装软件包:C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ Extensions \ ApacheCordovaTools \ packages \ vs-tac     1> ------来自源package.json的名称:vs-tac     1> ------来自源package.json的版本:1.0.42     1> ------软件包已经以正确的版本全局安装。     1> ------ Cordova工具6.1.1已经安装。     1> ------构建设置:     1> ------构建设置:     1> ------ platformConfigurationBldDir:C:\ Aleem \ Development \ InsightsGoApp \ InsightsGoApp \ bld \ Windows-x86 \ Debug     1> ------ platformConfigurationBinDir:C:\ Aleem \ Development \ InsightsGoApp \ InsightsGoApp \ bin \ Windows-x86 \ Debug     1> ------ buildCommand:构建     1> ------平台:Windows-x86     1> ------ cordova平台:Windows     1> ------配置:调试     1> ------ cordovaConfiguration:调试     1> ------ projectName:InsightsGoApp     1> ------ projectSourceDir:C:\ Aleem \ Development \ InsightsGoApp \ InsightsGoApp     1> ------ npmInstallDir:C:\ Users \ sheakbar \ AppData \ Roaming \ Microsoft \ VisualStudio \ MDA \ vs-npm \ 2.14.9     1> ------ buildTarget:LocalMachine     1> ------语言:美国     1> ------平台窗口已存在     1> ------更新插件     1> ------当前安装的插件:cordova-plugin-file @ 6.0.1,cordova-plugin-inappbrowser @ 3.0.0     1> ------当前安装的从属插件:cordova-plugin-device @ 2.0.2,cordova-plugin-network-information @ 2.0.1,cordova-plugin-whitelist @ 1.3.3

1>  ------ Currently configured plugins:
1>  ------ Preparing platform: windows
1>  Executing "before_prepare"  hook for all plugins.
1>  Executing "before_build"  hook for all plugins.
1>  Searching PlatformJson files for differences between project vs. platform installed plugins
1>  No differences found between project and windows platform. Continuing...
1>  Generating platform-specific config.xml from defaults for windows at C:\Aleem\Development\InsightsGoApp\InsightsGoApp\platforms\windows\config.xml
1>  Merging project's config.xml into platform-specific windows config.xml
1>  Found "merges/windows" folder. Copying its contents into the windows project.
1>  Merging and updating files from [www, platforms\windows\platform_www, merges\windows] to platforms\windows\www
1>    copy  platforms\windows\platform_www\cordova-js-src\confighelper.js platforms\windows\www\cordova-js-src\confighelper.js (updated file)
1>    copy  platforms\windows\platform_www\cordova-js-src\exec.js platforms\windows\www\cordova-js-src\exec.js (updated file)
1>    copy  platforms\windows\platform_www\cordova-js-src\platform.js platforms\windows\www\cordova-js-src\platform.js (updated file)
1>    copy  platforms\windows\platform_www\cordova_plugins.js platforms\windows\www\cordova_plugins.js (updated file)
1>    copy  www\global_constants.js platforms\windows\www\global_constants.js (updated file)
1>    copy  www\global_data.js platforms\windows\www\global_data.js (updated file)
1>    copy  www\global_static.js platforms\windows\www\global_static.js (updated file)
1>    copy  www\global_variables.js platforms\windows\www\global_variables.js (updated file)
1>    copy  www\index.html platforms\windows\www\index.html (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-device\src\windows\DeviceProxy.js platforms\windows\www\plugins\cordova-plugin-device\src\windows\DeviceProxy.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-device\www\device.js platforms\windows\www\plugins\cordova-plugin-device\www\device.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\src\windows\FileProxy.js platforms\windows\www\plugins\cordova-plugin-file\src\windows\FileProxy.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\DirectoryEntry.js platforms\windows\www\plugins\cordova-plugin-file\www\DirectoryEntry.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\DirectoryReader.js platforms\windows\www\plugins\cordova-plugin-file\www\DirectoryReader.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\Entry.js platforms\windows\www\plugins\cordova-plugin-file\www\Entry.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\File.js platforms\windows\www\plugins\cordova-plugin-file\www\File.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\FileEntry.js platforms\windows\www\plugins\cordova-plugin-file\www\FileEntry.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\FileError.js platforms\windows\www\plugins\cordova-plugin-file\www\FileError.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\FileReader.js platforms\windows\www\plugins\cordova-plugin-file\www\FileReader.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\FileSystem.js platforms\windows\www\plugins\cordova-plugin-file\www\FileSystem.js (updated file)



1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\FileUploadOptions.js platforms\windows\www\plugins\cordova-plugin-file\www\FileUploadOptions.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\FileUploadResult.js platforms\windows\www\plugins\cordova-plugin-file\www\FileUploadResult.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\FileWriter.js platforms\windows\www\plugins\cordova-plugin-file\www\FileWriter.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\Flags.js platforms\windows\www\plugins\cordova-plugin-file\www\Flags.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\LocalFileSystem.js platforms\windows\www\plugins\cordova-plugin-file\www\LocalFileSystem.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\Metadata.js platforms\windows\www\plugins\cordova-plugin-file\www\Metadata.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\ProgressEvent.js platforms\windows\www\plugins\cordova-plugin-file\www\ProgressEvent.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\browser\isChrome.js platforms\windows\www\plugins\cordova-plugin-file\www\browser\isChrome.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\fileSystemPaths.js platforms\windows\www\plugins\cordova-plugin-file\www\fileSystemPaths.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\fileSystems.js platforms\windows\www\plugins\cordova-plugin-file\www\fileSystems.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\requestFileSystem.js platforms\windows\www\plugins\cordova-plugin-file\www\requestFileSystem.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-file\www\resolveLocalFileSystemURI.js platforms\windows\www\plugins\cordova-plugin-file\www\resolveLocalFileSystemURI.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-inappbrowser\src\windows\InAppBrowserProxy.js platforms\windows\www\plugins\cordova-plugin-inappbrowser\src\windows\InAppBrowserProxy.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-inappbrowser\www\inappbrowser.js platforms\windows\www\plugins\cordova-plugin-inappbrowser\www\inappbrowser.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-network-information\src\windows\NetworkInfoProxy.js platforms\windows\www\plugins\cordova-plugin-network-information\src\windows\NetworkInfoProxy.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-network-information\www\Connection.js platforms\windows\www\plugins\cordova-plugin-network-information\www\Connection.js (updated file)
1>    copy  platforms\windows\platform_www\plugins\cordova-plugin-network-information\www\network.js platforms\windows\www\plugins\cordova-plugin-network-information\www\network.js (updated file)
1>    copy  www\scripts\Common\common.css platforms\windows\www\scripts\Common\common.css (updated file)
1>    copy  www\scripts\Common\jquery-2.1.4.min.js platforms\windows\www\scripts\Common\jquery-2.1.4.min.js (updated file)
1>    copy  www\scripts\Common\underscore-min-new.js platforms\windows\www\scripts\Common\underscore-min-new.js (updated file)
1>MSBUILD : cordova-build warning : Warning: The following image was skipped because it has an unsupported size (24x24): res/icons/windows/icon-24.png
1>MDAVSCLI : warning : The following image was skipped because it has an unsupported size (24x24): res/icons/windows/icon-24.png


1>MSBUILD : cordova-build warning : Warning: The following image was skipped because it has an unsupported size (48x48): res/icons/windows/icon-48.png
1>MDAVSCLI : warning : The following image was skipped because it has an unsupported size (48x48): res/icons/windows/icon-48.png
1>MSBUILD : cordova-build warning : Warning: The following image was skipped because it has an unsupported size (55x55): res/icons/windows/icon-55.png
1>MDAVSCLI : warning : The following image was skipped because it has an unsupported size (55x55): res/icons/windows/icon-55.png
1>  Updating icons and splash screens at platforms\windows\images
1>  Prepared windows project successfully
1>  Executing "pre_package"  hook for all plugins.
1>  Executing "after_prepare"  hook for all plugins.
1>  Discovered plugin "cordova-plugin-document-viewer" in config.xml. Installing to the project
1>  Executing "before_plugin_add"  hook for all plugins.
1>  Calling plugman.fetch on plugin "git+https://github.com/sitewaerts/cordova-plugin-document-viewer.git"
1>  Fetching plugin "git+https://github.com/sitewaerts/cordova-plugin-document-viewer.git" via git clone
1>  ------ Copied C:\Aleem\Development\InsightsGoApp\InsightsGoApp\bin\Windows-x86\Debug\Microsoft.AppxPackage.Metadata.Overrides.props to platforms\windows\Microsoft.AppxPackage.Metadata.Overrides.props
1>  ------ Building platform: windows
1>  Debug
1>  ------ Build configuration options: --debug
1>  Executing "before_compile"  hook for all plugins.
1>  Reading build config file: C:\Aleem\Development\InsightsGoApp\InsightsGoApp\build.json
1>  getLatestMatchingMSBuild
1>  getLatestMSBuild
1>  Searching for available MSBuild versions...
1>  Running command: C:\WINDOWS\system32\reg.exe query HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\15.5 /v MSBuildToolsPath
1>  Running command: C:\WINDOWS\system32\reg.exe query HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\15.0 /v MSBuildToolsPath
1>  Running command: C:\WINDOWS\system32\reg.exe query HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 /v MSBuildToolsPath
1>  Running command: C:\WINDOWS\system32\reg.exe query HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0 /v MSBuildToolsPath
1>  Running command: C:\WINDOWS\system32\reg.exe query HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0 /v MSBuildToolsPath
1>  Command finished with error code 1: C:\WINDOWS\system32\reg.exe query,HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\15.5,/v,MSBuildToolsPath
1>  Command finished with error code 1: C:\WINDOWS\system32\reg.exe query,HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\15.0,/v,MSBuildToolsPath
1>  Command finished with error code 0: C:\WINDOWS\system32\reg.exe query,HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0,/v,MSBuildToolsPath
1>  Found MSBuild v12.0 at C:\Program Files (x86)\MSBuild\12.0\bin\amd64\
1>  Command finished with error code 0: C:\WINDOWS\system32\reg.exe query,HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0,/v,MSBuildToolsPath
1>  Found MSBuild v14.0 at C:\Program Files (x86)\MSBuild\14.0\bin
1>  Command finished with error code 0: C:\WINDOWS\system32\reg.exe query,HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0,/v,MSBuildToolsPath
1>  Found MSBuild v4.0 at C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
1>  Using MSBuild v14.0 from C:\Program Files (x86)\MSBuild\14.0\bin
1>  Building project: C:\Aleem\Development\InsightsGoApp\InsightsGoApp\platforms\windows\CordovaApp.Windows10.jsproj
1>      Configuration : debug
1>      Platform      : x86
1>      Buildflags    : /p:AppxBundle=Never
1>      MSBuildTools  : C:\Program Files (x86)\MSBuild\14.0\bin
1>  Running command: C:\WINDOWS\system32\reg.exe query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows" /s /v InstallationFolder /reg:32
1>  Command finished with error code 0: C:\WINDOWS\system32\reg.exe query,HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows,/s,/v,InstallationFolder,/reg:32
1>  buildProject spawn: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild [ 'C:\\Aleem\\Development\\InsightsGoApp\\InsightsGoApp\\platforms\\windows\\CordovaApp.Windows10.jsproj',
1>    '/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal',
1>    '/nologo',
1>    '/p:Configuration=debug',
1>    '/p:Platform=x86',
1>    '/p:AppxBundle=Never' ] { stdio: 'inherit' }
1>  Running command: "C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" C:\Aleem\Development\InsightsGoApp\InsightsGoApp\platforms\windows\CordovaApp.Windows10.jsproj /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=debug /p:Platform=x86 /p:AppxBundle=Never
1>    prebuild.js: Patching platform `10`
1>    - Injected `base.js` reference to `/www/index.html`
1>    - Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.WinJS.2.0\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
1>    - Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.Phone.WinJS.2.1\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
1>    CordovaApp.Windows10 -> C:\Aleem\Development\InsightsGoApp\InsightsGoApp\platforms\windows\AppPackages\CordovaApp.Windows10_0.0.1.1_x86_debug_Test\CordovaApp.Windows10_0.0.1.1_x86_debug.appx


1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2748,5): error MSB3030: Could not copy the file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Add-AppDevPackage.ps1" because it was not found. [C:\Aleem\Development\InsightsGoApp\InsightsGoApp\platforms\windows\CordovaApp.Windows10.jsproj]
1>  Command finished with error code 1: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe C:\Aleem\Development\InsightsGoApp\InsightsGoApp\platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=debug,/p:Platform=x86,/p:AppxBundle=Never
1>MSBUILD : cordova-build error : code: Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1 No valid MSBuild was detected for the selected target: Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
1>code : error C: \Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1 No valid MSBuild was detected for the selected target: Error C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==`enter code here`========

1 个答案:

答案 0 :(得分:0)

在尝试使用Windows 10 SDK时,我也遇到了无尽的错误,这是有史以来最糟糕的SDK。尝试使用WP 8.1 SDK,您可以通过选择 Windows Universal 作为目标,使用Windows Phone 8.1和Windows 10 Mobile以及VS2015为其创建应用。

如果您尚未安装,则可能需要绝对卸载所有内容,然后从VS安装程序安装8.1 SDK。您也可以使用独立的SDK 8.1 Update 1 installer。您需要下载一个标有 Windows Phone 8.1更新和模拟器的软件。

最后:如果您决定切换到VS2017 forget about WP8.1 compatibility,因为它不适用于8.1 SDK,这就是为什么我继续使用VS2015和8.1 SDK的原因。