2

我想我會嘗試建立一個與Visual Studio 2015的科爾多瓦應用程序,我通常使用不同的IDE(intellij和Netbeans)沒有任何問題,但想象嘗試一種新工具(如我對某些網絡應用使用VS)。創建科爾多瓦應用程序Visual Studio 2015構建錯誤

我已經安裝了VS2015社區並且安裝了cordova工具。

我想我會做的默認設置和運行測試,但我得到生成錯誤按屏幕截圖

enter image description here

不知道它是什麼關於.....如果我跑VS 2015作爲管理員(快捷選項 - 即使我的用戶帳戶是管理員 - 很好的一個窗口),我仍然遇到構建問題,但沒有錯誤報告,其他人都經歷過這種情況?

企業化管理,這是屏幕看起來像一張空白科爾多瓦應用

enter image description here

我通過置快捷

enter image description here

回答

0

當您最初安裝了VS 2015年,做了您選擇安裝「通用工具和軟件開發...」功能。如果沒有,請轉到Windows的「控制面板中的添加/刪除程序」,然後選擇修改VS 2015安裝並勾選它。希望這可以幫助。

Screenshot of VS 2015 RC Install

+0

是的安裝所有這些選項..乾杯的答覆..病態進行谷歌搜索:)。 – Madmartigan

+0

在安裝過程中,您確定在此屏幕上選擇了APACHE ANT嗎? –

+0

是啊,很確定,但我知道犯錯誤...感謝評論的職位。乾杯.. – Madmartigan

1

檢查你的編譯後的輸出窗口。這將提供更詳細的信息。您可以訪問輸出窗口:

查看>輸出

CTRL + W,O-

在 「從顯示輸出:」 下拉菜單中選擇 「構建」

+0

感謝您的回覆,我看着輸出,我看不到任何明顯的,但已設法解決它......我會在下面發佈答案。 – Madmartigan

2

正如@DeanB_Develop上面所建議的那樣,我查看了輸出。對於興趣如下;

All packages are already installed and there is nothing to restore. 
    NuGet package restore finished. 
    1>------ Build started: Project: BlankCordovaApp2, Configuration: Debug Android ------ 
    1> Your environment has been set up for using Node.js 0.10.35 (x64) and npm. 
    1> ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac 
    1> ------ Name from source package.json: vs-tac 
    1> ------ Version from source package.json: 0.2.19 
    1> ------ Package not currently installed globally. 
    1> ------ Installing globally from source package. This could take a few minutes... 
    1> npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.10.35","npm":"2.1.5"}) 
    1> C:\Program Files (x86)\nodejs\vs-tac-cli -> C:\Program Files (x86)\nodejs\node_modules\vs-tac\vs-tac-cli.cmd 
    1> [email protected] C:\Program Files (x86)\nodejs\node_modules\vs-tac 
    1> ├── [email protected] 
    1> ├── [email protected] 
    1> ├── [email protected] 
    1> ├── [email protected] 
    1> ├── [email protected] 
    1> ├── [email protected] 
    1> ├── [email protected] ([email protected], [email protected]) 
    1> ├── [email protected] ([email protected]) 
    1> ├── [email protected] ([email protected], [email protected]) 
    1> ├── [email protected] ([email protected], [email protected]) 
    1> ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    1> ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    1> └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
    1> ------ npm install failed. Exit code: 0 
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 
    ========== Deploy: 0 succeeded, 0 failed, 0 skipped ========== 

我唯一能看到的是一個npm WARN,但不知道這是否導致問題。

所以,我訪問了以下頁谷歌搜索後,顯示可independatly https://msdn.microsoft.com/en-au/library/dn771551.aspx

那突出的是「蟻族」的唯一的事情要安裝的工具。我現在安裝了它,但它的WinAnt居住在我的程序文件中。我確實選擇了安裝cordova工具時的選項,所以不知道發生了什麼事情 - 也許我的winant嚇到它了...

我從該頁下載了該版本,並將其提取到一個文件夾c:\ apache -ant-XXX

然後更新ANT_HOME環境變量以指向新文件夾而不是WinAnt,並且還將新文件夾路徑添加到系統路徑。

然後再次加載Visual Studio並運行該項目。

working project example

耶它的工作原理,現在就開始做一些實際的工作:)。

+0

很高興你能工作! –

0

下載APACHE ANT並將其解壓縮到文件夾c:\ apache-ant-x.x.x。然後更新ANT_HOME環境變量以指向新文件夾(而不是WinAnt)並將新文件夾路徑添加到系統路徑。 ;)

相關問題