【发布时间】:2017-12-13 17:53:23
【问题描述】:
我有一个 Ionic 应用程序,我刚刚在仅安装了 Visual Studio 2017 的 Windows PC 上添加了 Window 平台。
在一些其他初始问题之后,我想我已经完成了最后一道障碍,那就是我在尝试构建时遇到以下错误(即运行 ionic cordova build windows)...
Building project: H:\dev\apps\mobileapps\myapp\trunk\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : debug
Platform : anycpu
Patching 10 in prebuild event...
Injected base.js reference to the /www/index.html
Removing /(
*)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.WinJS.2.0\/js\/base.js">\s*<\/script>)(\s*)/ from
/www/index.html
Removing /(
*)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.Phone.WinJS.2.1\/js\/base.js">\s*<\/script>)(\s*)/
from /www/index.html
Creating library
H:\dev\apps\mobileapps\myapp\trunk\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\debug\SQLite3.UWP\SQLite3.UWP.lib
and object
H:\dev\apps\mobileapps\myapp\trunk\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\debug\SQLite3.UWP\SQLite3.UWP.exp
SQLite3.UWP.vcxproj ->
H:\dev\apps\mobileapps\myapp\trunk\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\debug\SQLite3.UWP\SQLite3.UWP.dll
SQLite3.UWP.vcxproj ->
H:\dev\apps\mobileapps\myapp\trunk\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\debug\SQLite3.UWP\SQLite3.UWP.pdb
(Partial PDB)
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\MSBuild\15.0\Microsoft.Common.targets\ImportBefore\Microsoft.Cpp.VCLibs120Universal.targets(103,5):
warning MSB3842: Project "CordovaApp.Windows10" depends upon SDK "Microsoft Universal CRT Debug Runtime
v10.0.15063.0" which supports apps targeting "UAP 10.0". To verify whether "Microsoft Universal CRT Debug
Runtime v10.0.15063.0" is compatible with "UAP 10.0.15063.0", contact the SDK author or see
http://go.microsoft.com/fwlink/?LinkID=309181.
[H:\dev\apps\mobileapps\myapp\trunk\platforms\windows\CordovaApp.Windows10.jsproj]
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\MSBuild\15.0\Microsoft.Common.targets\ImportBefore\Microsoft.Cpp.VCLibs120Universal.targets(103,5):
error MSB3779: The processor architecture of the project being built "Any CPU" is not supported by the
referenced SDK "Microsoft.UniversalCRT.Debug, Version=10.0.15063.0". Please consider changing the targeted
processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to
one of the architectures supported by the SDK: "x86, x64, ARM, ARM64".
[H:\dev\apps\mobileapps\myapp\trunk\platforms\windows\CordovaApp.Windows10.jsproj]
Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe: Command
failed with exit code 1
解决方案和项目最初确实设置了“任何 CPU”,但我已经进去尝试将其设置为 x86 和 ARM..
我已经保存了所有,我可以在 Visual Studio 中构建解决方案,但是当我进行离子构建时,它总是抱怨“任何 cpu”。
有没有人知道为什么会这样以及如何解决它?
提前致谢!
【问题讨论】:
标签: cordova ionic-framework uwp ionic3