2014-09-03 60 views
2

我在cordova 3.5命令行界面的帮助下构建移动应用程序。我在我的应用程序中安装了windows8,wp8,android和firfox-os。 我能够构建android和firefox-os。但是当我试图构建windows8或wp8时,错误显示为:在命令行(科尔多瓦-3.5)中构建Cordova-WP8项目时出错

C:\Users\igs\hello>cordova build wp8 
Running command: C:\Users\igs\hello\platforms\wp8\cordova\build.bat 

WARNING: [ --debug | --release ] not specified, defaulting to debug... 
Cleaning cordova project... 
Building Cordova-WP8 Project: 
     Configuration : Debug 
     Directory : C:\Users\igs\hello\platforms\wp8 
toolsVersion 0 is not supported 
     MSBuildToolsPath: C:\Windows\Microsoft.NET\Framework\v4.0.30319\ 
buildCommand = %comspec% /c ""C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbu 
ild" "C:\Users\igs\hello\platforms\wp8\HelloWorld.sln" /clp:NoSummary;NoIt 
emAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Debug" 
Building the projects in this solution one at a time. To enable parallel build, 
please add the "/m" switch. 
C:\Users\igs\hello\platforms\wp8\HelloWorld.csproj(192,5): error MSB4019: 
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsPhone\v8.0 
\Microsoft.WindowsPhone.v8.0.Overrides.targets" was not found. Confirm that the 
path in the <Import> declaration is correct, and that the file exists on disk. 
Error: C:\Users\igs\hello\platforms\wp8\cordova\build.bat: Command failed 
with exit code 2 
    at ChildProcess.whenDone (C:\Users\igs\AppData\Roaming\npm\node_module 
s\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23) 
    at ChildProcess.emit (events.js:98:17) 
    at maybeClose (child_process.js:756:16) 
    at Process.ChildProcess._handle.onexit (child_process.js:823:5) 

是否需要安装任何东西?请帮帮我。 在此先感谢。

+0

只要有完全相同的问题... – teone 2014-09-03 12:28:11

+0

我有同样的问题yesteday ... 我是在第一次尝试咕噜身材,我所做的就是删除WP8平台,然后 **科尔多瓦平台添加窗口, cordova build windows ** 然后我能够成功构建 – 2014-10-28 01:30:26

回答

1

我有同样的问题。你有可能已经更新到科尔多瓦4吗?这样做后我意识到了这个问题。

@Dev创建一个Windows项目的作品,但创建一个WP8仍然是一个问题。当使用“cordova平台删除wp8”时,您可以添加wp8作为平台,但在构建wp8项目时会产生相同的错误。

我认为在我的情况下,它是cordova引用Program Files(x86),我没有该文件夹(只是“程序(x86)”)的问题。也许你有同样的问题。你也可以谷歌的“C:\ Program Files文件(x86)\ MSBuild \微软\ WindowsPhone \ v8.0 \ Microsoft.WindowsPhone.v8.0.Overrides.targets”,有一些关于这个stackoverflow文章话题已经存在,所以你可能在那里找到解决方案。

+0

您是如何解决此问题的? – Hunt 2014-10-30 05:14:51

+0

昨天建立窗户(科尔多瓦平台添加窗口,科尔多瓦建立窗口)后,它的工作只是使用“科尔多瓦建设”(建设wp8本身不工作)。程序(x86)被认为是C:\ Program Files文件(x86) - 错误尝试:(该问题是由于缺少C:\ Program Files文件(x86)\ MSBuild \ Microsoft中的WindowsPhone文件夹导致的。如果你能解决它,通过安装windows phone sdk(http://docs.phonegap.com/en/2.3.0/guide_getting-started_windows-phone-8_index.md.html)。不幸的是我无法测试它,因为我不允许在这台电脑上安装软件。 – 2014-10-30 08:16:59

相关问题