在构建Cordova Windows应用程序时出错



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>------ 来自源码包.json的名称: vs-tac 1>------ 源码包.json的版本:1.0.42 1>------ 软件包已以正确的版本全局安装。 1>------ 已安装科尔多瓦工具 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>------ 构建命令:构建 1>------平台:视窗-x86 1>------科尔多瓦平台:窗户 1>------配置:调试 1>------ cordova配置:调试 1>------项目名称:洞察GoApp 1>------ projectSourceDir: C:\Aleem\Development\InsightsGoApp\InsightsGoApp 1>------ npmInstallDir: C:\Users\sheakbar\AppData\Roaming\Microsoft\VisualStudio\MDA\vs-npm\2.14.9 1>------ 构建目标:本地机器 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:AleemDevelopmentInsightsGoAppInsightsGoAppplatformswindowsconfig.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, platformswindowsplatform_www, mergeswindows] to platformswindowswww
1>    copy  platformswindowsplatform_wwwcordova-js-srcconfighelper.js platformswindowswwwcordova-js-srcconfighelper.js (updated file)
1>    copy  platformswindowsplatform_wwwcordova-js-srcexec.js platformswindowswwwcordova-js-srcexec.js (updated file)
1>    copy  platformswindowsplatform_wwwcordova-js-srcplatform.js platformswindowswwwcordova-js-srcplatform.js (updated file)
1>    copy  platformswindowsplatform_wwwcordova_plugins.js platformswindowswwwcordova_plugins.js (updated file)
1>    copy  wwwglobal_constants.js platformswindowswwwglobal_constants.js (updated file)
1>    copy  wwwglobal_data.js platformswindowswwwglobal_data.js (updated file)
1>    copy  wwwglobal_static.js platformswindowswwwglobal_static.js (updated file)
1>    copy  wwwglobal_variables.js platformswindowswwwglobal_variables.js (updated file)
1>    copy  wwwindex.html platformswindowswwwindex.html (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-devicesrcwindowsDeviceProxy.js platformswindowswwwpluginscordova-plugin-devicesrcwindowsDeviceProxy.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-devicewwwdevice.js platformswindowswwwpluginscordova-plugin-devicewwwdevice.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filesrcwindowsFileProxy.js platformswindowswwwpluginscordova-plugin-filesrcwindowsFileProxy.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwDirectoryEntry.js platformswindowswwwpluginscordova-plugin-filewwwDirectoryEntry.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwDirectoryReader.js platformswindowswwwpluginscordova-plugin-filewwwDirectoryReader.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwEntry.js platformswindowswwwpluginscordova-plugin-filewwwEntry.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwFile.js platformswindowswwwpluginscordova-plugin-filewwwFile.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwFileEntry.js platformswindowswwwpluginscordova-plugin-filewwwFileEntry.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwFileError.js platformswindowswwwpluginscordova-plugin-filewwwFileError.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwFileReader.js platformswindowswwwpluginscordova-plugin-filewwwFileReader.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwFileSystem.js platformswindowswwwpluginscordova-plugin-filewwwFileSystem.js (updated file)

1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwFileUploadOptions.js platformswindowswwwpluginscordova-plugin-filewwwFileUploadOptions.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwFileUploadResult.js platformswindowswwwpluginscordova-plugin-filewwwFileUploadResult.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwFileWriter.js platformswindowswwwpluginscordova-plugin-filewwwFileWriter.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwFlags.js platformswindowswwwpluginscordova-plugin-filewwwFlags.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwLocalFileSystem.js platformswindowswwwpluginscordova-plugin-filewwwLocalFileSystem.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwMetadata.js platformswindowswwwpluginscordova-plugin-filewwwMetadata.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwProgressEvent.js platformswindowswwwpluginscordova-plugin-filewwwProgressEvent.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwbrowserisChrome.js platformswindowswwwpluginscordova-plugin-filewwwbrowserisChrome.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwfileSystemPaths.js platformswindowswwwpluginscordova-plugin-filewwwfileSystemPaths.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwfileSystems.js platformswindowswwwpluginscordova-plugin-filewwwfileSystems.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwrequestFileSystem.js platformswindowswwwpluginscordova-plugin-filewwwrequestFileSystem.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-filewwwresolveLocalFileSystemURI.js platformswindowswwwpluginscordova-plugin-filewwwresolveLocalFileSystemURI.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-inappbrowsersrcwindowsInAppBrowserProxy.js platformswindowswwwpluginscordova-plugin-inappbrowsersrcwindowsInAppBrowserProxy.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-inappbrowserwwwinappbrowser.js platformswindowswwwpluginscordova-plugin-inappbrowserwwwinappbrowser.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-network-informationsrcwindowsNetworkInfoProxy.js platformswindowswwwpluginscordova-plugin-network-informationsrcwindowsNetworkInfoProxy.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-network-informationwwwConnection.js platformswindowswwwpluginscordova-plugin-network-informationwwwConnection.js (updated file)
1>    copy  platformswindowsplatform_wwwpluginscordova-plugin-network-informationwwwnetwork.js platformswindowswwwpluginscordova-plugin-network-informationwwwnetwork.js (updated file)
1>    copy  wwwscriptsCommoncommon.css platformswindowswwwscriptsCommoncommon.css (updated file)
1>    copy  wwwscriptsCommonjquery-2.1.4.min.js platformswindowswwwscriptsCommonjquery-2.1.4.min.js (updated file)
1>    copy  wwwscriptsCommonunderscore-min-new.js platformswindowswwwscriptsCommonunderscore-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 platformswindowsimages
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:AleemDevelopmentInsightsGoAppInsightsGoAppbinWindows-x86DebugMicrosoft.AppxPackage.Metadata.Overrides.props to platformswindowsMicrosoft.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:AleemDevelopmentInsightsGoAppInsightsGoAppbuild.json
1>  getLatestMatchingMSBuild
1>  getLatestMSBuild
1>  Searching for available MSBuild versions...
1>  Running command: C:WINDOWSsystem32reg.exe query HKLMSOFTWAREMicrosoftMSBuildToolsVersions15.5 /v MSBuildToolsPath
1>  Running command: C:WINDOWSsystem32reg.exe query HKLMSOFTWAREMicrosoftMSBuildToolsVersions15.0 /v MSBuildToolsPath
1>  Running command: C:WINDOWSsystem32reg.exe query HKLMSOFTWAREMicrosoftMSBuildToolsVersions14.0 /v MSBuildToolsPath
1>  Running command: C:WINDOWSsystem32reg.exe query HKLMSOFTWAREMicrosoftMSBuildToolsVersions12.0 /v MSBuildToolsPath
1>  Running command: C:WINDOWSsystem32reg.exe query HKLMSOFTWAREMicrosoftMSBuildToolsVersions4.0 /v MSBuildToolsPath
1>  Command finished with error code 1: C:WINDOWSsystem32reg.exe query,HKLMSOFTWAREMicrosoftMSBuildToolsVersions15.5,/v,MSBuildToolsPath
1>  Command finished with error code 1: C:WINDOWSsystem32reg.exe query,HKLMSOFTWAREMicrosoftMSBuildToolsVersions15.0,/v,MSBuildToolsPath
1>  Command finished with error code 0: C:WINDOWSsystem32reg.exe query,HKLMSOFTWAREMicrosoftMSBuildToolsVersions12.0,/v,MSBuildToolsPath
1>  Found MSBuild v12.0 at C:Program Files (x86)MSBuild12.0binamd64
1>  Command finished with error code 0: C:WINDOWSsystem32reg.exe query,HKLMSOFTWAREMicrosoftMSBuildToolsVersions14.0,/v,MSBuildToolsPath
1>  Found MSBuild v14.0 at C:Program Files (x86)MSBuild14.0bin
1>  Command finished with error code 0: C:WINDOWSsystem32reg.exe query,HKLMSOFTWAREMicrosoftMSBuildToolsVersions4.0,/v,MSBuildToolsPath
1>  Found MSBuild v4.0 at C:WindowsMicrosoft.NETFramework64v4.0.30319
1>  Using MSBuild v14.0 from C:Program Files (x86)MSBuild14.0bin
1>  Building project: C:AleemDevelopmentInsightsGoAppInsightsGoAppplatformswindowsCordovaApp.Windows10.jsproj
1>      Configuration : debug
1>      Platform      : x86
1>      Buildflags    : /p:AppxBundle=Never
1>      MSBuildTools  : C:Program Files (x86)MSBuild14.0bin
1>  Running command: C:WINDOWSsystem32reg.exe query "HKLMSOFTWAREMicrosoftMicrosoft SDKsWindows" /s /v InstallationFolder /reg:32
1>  Command finished with error code 0: C:WINDOWSsystem32reg.exe query,HKLMSOFTWAREMicrosoftMicrosoft SDKsWindows,/s,/v,InstallationFolder,/reg:32
1>  buildProject spawn: C:Program Files (x86)MSBuild14.0binmsbuild [ '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)MSBuild14.0binmsbuild.exe" C:AleemDevelopmentInsightsGoAppInsightsGoAppplatformswindowsCordovaApp.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 /( *)(<scripts+(?:type="text/javascript"s+)?src="//Microsoft.WinJS.2.0/js/base.js">s*</script>)(s*)/ from /www/index.html
1>    - Removing /( *)(<scripts+(?:type="text/javascript"s+)?src="//Microsoft.Phone.WinJS.2.1/js/base.js">s*</script>)(s*)/ from /www/index.html
1>    CordovaApp.Windows10 -> C:AleemDevelopmentInsightsGoAppInsightsGoAppplatformswindowsAppPackagesCordovaApp.Windows10_0.0.1.1_x86_debug_TestCordovaApp.Windows10_0.0.1.1_x86_debug.appx

1>C:Program Files (x86)MSBuildMicrosoftVisualStudiov14.0AppxPackageMicrosoft.AppXPackage.Targets(2748,5): error MSB3030: Could not copy the file "C:Program Files (x86)MSBuildMicrosoftVisualStudiov14.0AppxPackageAdd-AppDevPackage.ps1" because it was not found. [C:AleemDevelopmentInsightsGoAppInsightsGoAppplatformswindowsCordovaApp.Windows10.jsproj]
1>  Command finished with error code 1: C:Program Files (x86)MSBuild14.0binmsbuild.exe C:AleemDevelopmentInsightsGoAppInsightsGoAppplatformswindowsCordovaApp.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)MSBuild14.0binmsbuild.exe: Command failed with exit code 1 No valid MSBuild was detected for the selected target: Error: C:Program Files (x86)MSBuild14.0binmsbuild.exe: Command failed with exit code 1
1>code : error C: Program Files (x86)MSBuild14.0binmsbuild.exe: Command failed with exit code 1 No valid MSBuild was detected for the selected target: Error C:Program Files (x86)MSBuild14.0binmsbuild.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`========

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

您可能需要完全卸载所有内容,然后从VS安装程序安装8.1 SDK(如果尚未安装(。您还可以使用独立的 SDK 8.1 更新 1 安装程序。您需要下载标有Windows Phone 8.1更新和模拟器的那个。

最后:如果您决定切换到VS2017,请忘记WP8.1兼容性,因为它不适用于8.1 SDK,这就是我继续使用VS2015和8.1 SDK的原因。

相关内容