今天因爲工作需要打算在Eclipse上安裝一下Eclipse RCP Plugin-in Developer Resource 3.7.2的插件,照常使用Eclipse自帶的最方便的“Install New Software”如圖。
結果報錯說Cannot complete the install because of a conflicting dependency.
筆者已經安裝了3.6版本的RCP Developer Plugin,所以和想要安裝的3.7版本產生了衝突。筆者個人認爲Eclipse這一點是比較弱的,理想情況下應該詢問是否需要從3.6升級到3.7,Eclipse沒有這樣做,而是提供了專門的升級功能,在Help-->Check For Updates。
點擊Check For Updates,又遇到新的問題說
Some sites could not be found. See the error log for more detail.
No repository found at http://download.eclipse.org/tools/emf/updates/.
No repository found at http://subclipse.tigris.org/update_1.5.x.
No repository found at http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository.
No repository found at http://www.eclipse.org/modeling/emf/downloads/.
這是因爲有些repository (代碼倉庫) 不是永久性的,有些當初安裝插件的地址可能已經失效,而Eclipse的升級功能是查看所有地址的插件,和本地插件版本相比對,來判斷是否需要升級。解決方法是,打開Help-->Install New Software,然後打開所有的available sites。筆者手動刪掉了上面錯誤提示中說找不到倉庫的4個地址。
然後重新Check For Updates,果然找到了3.7.2版本的Eclipse Platform,選中並進行升級。
完成後重啓Eclipse,如此便完成了Eclipse插件升級。