2014-09-03 41 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

相關問題