4

我想创建由我通过 Node.js 安装的 Cordova 3.1.0 提供支持的跨平台应用程序。我已经安装了 Visual Studio 2012 和 Windows Phone SDK 8 + 更新。我也加了

我在环境变量中的路径看起来:

C:\Python33\;C:\Program Files\PHP\v5.3;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Users\Filip\AppData\Local\Temp;C:\Python27;C:\Users\Filip\AppData\Roaming\npm;E:\dev\adt-bundle\sdk\platform-tools;E:\dev\adt-bundle\sdk\tools;E:\dev\WinAnt\bin;C:\Windows\Microsoft.NET\Framework\v4.0.30319

我通过命令创建了应用程序:

cordova create d4m com.example.d4m Drupal4me

我添加了 Android 平台:

cordova platform add android

我可以构建一些 Android 应用程序。但是 Windows Phone 7 / WP 8 存在一些问题......我正在尝试:

cordova platform add wp7

并收到错误:

Checking wp7 requirements...
[Error: Error while checking requirements: Please install the .NET Framwork v4.0
.30319 (in the latest windows phone SDK's).
Make sure the "msbuild" command in your path is pointing to  v4.0.30319 of msbui
ld as well (inside C:\Windows\Microsoft.NET\Framework\v4.0.30319).
]

我在 Windows 8.1 工作并安装了最新的 .net 框架。我能做些什么?

4

4 回答 4

4

I had same problem and when I ran verbose on build ("phonegap -V local build wp7"), I've discovered that error was from this file:

[phonegap] Running ""C:\Users\Tom.cordova\lib\wp\cordova\3.1.0\wp7\bin\check_reqs"" (output to follow)

specifically in 78.line

var msversion = output.match(/.NET\sFramework\,\sversion\s4.0/);

which looked for English 'version', but msbuild was returning version in localized string (in this case czech word "verze" for version)

[Microsoft .NET Framework, verze 4.0.30319.34003]

so solution is to change change reg. expr. to accept any word (\w*) between characters "," and "4":

var msversion = output.match(/.NET\sFramework\,\s\w*\s4.0/);

After that phonegap builds project successfully.

于 2013-11-15T23:19:03.510 回答
3

我同意 Witriol

PhoneGap 3.3.0 和 wp8 有同样的问题,我所要做的就是注释掉这个文件中的版本检查:C:\Users\Lander.cordova\lib\wp\cordova\3.3.0\wp8\bin\check_reqs .js

这是麻烦制造者:

var msversion = output.match(/Microsoft\s\(R\)\s+Build\sEngine\s[a-z]+\s4\.0\.30319/i);

这个也应该在非英语环境中工作:

var msversion = output.match(/.NET\sFramework\,\s\w*\s4.0.30319/i);
于 2014-02-06T14:49:22.920 回答
2

只需在系统变量“PATH”C:\Windows\Microsoft.NET\Framework\v4.0.30319\ 中设置环境变量;

碰巧没有找到 msbuild。

之后重新启动 cmd 并输入“msbuild -version”你会看到版本。

于 2013-11-28T06:11:17.400 回答
0

与西班牙语相同,因为Versión而不是Version

需要修改

C:\Users\Roberto\.cordova\lib\wp\cordova\3.3.0\wp8\bin\check_reqs.js

更改第 84 行

83    var msversion = output.match(/Microsoft\s\(R\)\s+Build\sEngine\s[a-z]+\s4\.0\.30319/i);
84    if (!msversion) {

84    if (false) {

和工作

于 2013-12-31T00:59:30.840 回答