2014年9月10日 星期三

[Coding][Android] 如何解決"Cannot complete the install because of a conflicting dependency" in Eclipse

今天嘗試要重拾許久沒碰的Android APK development,當然第一件事情就是更新。除了Android SDK manager,還包括Eclipse和Android Development Kits (ADT)。

Android SDK manager還算順利,唯一就是因為太久沒更新了,花了蠻久的時間。

不過場景一換到Eclipse,就彷彿是不同的故事了。一開啟後馬上就出現:"This version of ADT requires android sdk tools in revision 23.0.0 or above.current revision is 22.6.0.Please upgrade your sdk to latest version"

原本以為按下Check for updates,就可以搞定了,沒想到竟是災難的開始。原來,在Check for updates以後,結果卻是No update is available。

接著想嘗試手動更新,進入Help -> Install New Software...,將Work with的address改為https://dl-ssl.google.com/android/eclipse/,接著勾選Select All,按下Next,沒想到卻跑出錯誤訊息:.
Cannot complete the install because of a conflicting dependency.
  Software being installed: Tracer for OpenGL ES 23.0.3.1327240 (com.android.ide.eclipse.gldebugger.feature.feature.group 23.0.3.1327240)
  Software currently installed: Tracer for OpenGL ES 22.6.0.v201403010043-1049357 (com.android.ide.eclipse.gldebugger.feature.group 22.6.0.v201403010043-1049357)
  Only one of the following can be installed at once:
    Tracer for OpenGL ES 23.0.3.1327240 (com.android.ide.eclipse.gldebugger 23.0.3.1327240)
    Tracer for OpenGL ES 22.6.0.v201403010043-1049357 (com.android.ide.eclipse.gldebugger 22.6.0.v201403010043-1049357)
  Cannot satisfy dependency:
    From: Tracer for OpenGL ES 23.0.3.1327240 (com.android.ide.eclipse.gldebugger.feature.feature.group 23.0.3.1327240)
    To: com.android.ide.eclipse.gldebugger [23.0.3.1327240]
  Cannot satisfy dependency:
    From: Tracer for OpenGL ES 22.6.0.v201403010043-1049357 (com.android.ide.eclipse.gldebugger.feature.group 22.6.0.v201403010043-1049357)
    To: com.android.ide.eclipse.gldebugger [22.6.0.v201403010043-1049357]

這還真是令人失望的消息。

不過,還是有方法解決的,解決的方法就是先將原本的ADT移除,再重新安裝ADT就可以啦。

移除ADT

1. 點選Help > About Eclipse

2. 選擇Installation Detals

3. 利用Ctrl + 滑鼠左鍵選擇ADT相關的packages,然後按下uninstall

重新安裝ADT

1. 點選Help > Install New Software...

2.  下拉Work with的選擇為https://dl-ssl.google.com/android/eclipse/,選擇Select All,並按下Next開始安裝,一切就大功告成啦!

P.S. 因為我是採用Android SDK、Eclipse和ADT分開下載安裝的,因此這樣的方式對我有效。如果您是直接下載ADT bundle (內含Android SDK、Eclipse和ADT),那麼請直接重新下載最新的就可以了。

P.S.2 在過程中一度想要放棄,想乾脆直接下載ADT bundle來用就好了,可是老天爺可能就是要我解決這難關吧,下載下來的只要一開啟Eclipse,初始化完成後,就會直接退出。在eclipse的目錄下則出現了error log,內容如下。不過也是因為如此,才有這篇文章的產生...哈哈哈

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x577df06b, pid=2676, tid=572
#
# JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build 1.7.0_67-b01)
# Java VM: Java HotSpot(TM) Client VM (24.65-b04 mixed mode windows-x86 )
# Problematic frame:
# C  [gdiplus.dll+0xf06b]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.




張貼留言