我對使用Ionic/Apache Cordova/Visual Studio開發應用程序的工具感到困惑。我開始使用Ionic命令行,然後當我聽說他們已經引入tools for Apache Cordova時,遷移到Visual Studio 2015。但現在我打了problem afterproblem with the Ripple emulator in Visual Studio。我應該如何讓我的Ionic/Apache Cordova/Visual Studio環境保持最新狀態?
所以我試圖回到離子命令行來效仿,但是當我鍵入ionic emulate android
我得到這個錯誤:
cmd: Command failed with exit code 2
at ChildProcess.whenDone (C:\..\npm\node_modules\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)
我也得到一個消息,我的離子的本地版本出來的日期。我想知道更新是否可以解決這個錯誤,但是我擔心如果我通過命令行更新Ionic,那我打破了Visual Studio Tools For Apache Cordova中的一些依賴。
我已閱讀where the Ionic framework fits in和 PhoneGap is a distribution of Apache Cordova,但我仍然對如何保持最新和兼容性感到困惑。
今天發佈的公告中提到我的疑惑,現在有command line "Tools For Apache Cordova" - 「由我們的Visual Studio產品團隊驗證」。這與我的Visual Studio擴展和更新中已有的recently updated "Tools for Apache Cordova"適合於哪裏?
所以:
- 我可以放心地通過命令行
ionic lib update
更新離子和仍預計Visual Studio的工具來工作? - 什麼導致錯誤,當我嘗試
ionic emulate android
? - 任何人都可以解釋這些工具如何配合在一起,以及如何讓它們保持最新?
編輯 - 添加更多的信息 我想如果我理解如何使用最新版本的離子和科爾多瓦就像使用離子命令行我還沒有開始時,是我的困惑會減少只使用Visual Studio。
標準的項目模板把鏈接到<script src="http://code.ionicframework.com/1.0.0-rc.5/js/ionic.bundle.min.js">
和<link href="http://code.ionicframework.com/1.0.0-rc.5/css/ionic.css" rel="stylesheet">
,所以我可以假設該集合包含所有的依賴和VS2015下載它時,它正在建設的應用程序,所有我必須做的,做的是改變1.0.0-rc.5
到1.1.0
?
科爾多瓦呢?我的taco.json
文件指定它是版本4.3.0
。當我需要更新科爾多瓦時,我是否只需更改它,VS2015會處理其他問題?
讓我感到困惑的一件事是,我沒有意識到'ionic lib'告訴我在'lib/ionic'文件夾(當前爲1.1.0)和'ionic - v'告訴我CLI的版本(現在我使用npm更新它後爲1.7.7),這兩件事情非常不同。 – Colin