2014-11-03 54 views
1

我是android開發人員和Eclipse上的新手。每當我創建一個應用程序,它只是給出了錯誤ActionBarActivity無法解析爲類型,Jar不匹配:Eclipse

我的平臺:

Android SDK中的工具:23.0.5 的Android sdkplatform工具:21 的Android sdkbuild工具:21.1

錯誤:

[2014-11-03 15:58:24 - Test] Found 2 versions of android-support-v4.jar in the dependency list, 
[2014-11-03 15:58:24 - Test] but not all the versions are identical (check is based on SHA-1 only at this time). 
[2014-11-03 15:58:24 - Test] All versions of the libraries must be the same at this time. 
[2014-11-03 15:58:24 - Test] Versions found are: 
[2014-11-03 15:58:24 - Test] Path: C:\Users\Zain-ul-abdeen\workspace\Test\libs\android-support-v4.jar 
[2014-11-03 15:58:24 - Test] Length: 987314 
[2014-11-03 15:58:24 - Test] SHA-1: 9b6a9a9078af571732159b904ad423b03b7cc786 
[2014-11-03 15:58:24 - Test] Path: C:\Users\Zain-ul-abdeen\workspace\appcompat_v7\libs\android-support-v4.jar 
[2014-11-03 15:58:24 - Test] Length: 758727 
[2014-11-03 15:58:24 - Test] SHA-1: efec67655f6db90757faa37201efcee2a9ec3507 
[2014-11-03 15:58:24 - Test] Jar mismatch! Fix your dependencies 
[2014-11-03 15:58:24 - Test] Found 2 versions of android-support-v4.jar in the dependency list, 
[2014-11-03 15:58:24 - Test] but not all the versions are identical (check is based on SHA-1 only at this time). 
[2014-11-03 15:58:24 - Test] All versions of the libraries must be the same at this time. 
[2014-11-03 15:58:24 - Test] Versions found are: 
[2014-11-03 15:58:24 - Test] Path: C:\Users\Zain-ul-abdeen\workspace\Test\libs\android-support-v4.jar 
[2014-11-03 15:58:24 - Test] Length: 987314 
[2014-11-03 15:58:24 - Test] SHA-1: 9b6a9a9078af571732159b904ad423b03b7cc786 
[2014-11-03 15:58:24 - Test] Path: C:\Users\Zain-ul-abdeen\workspace\appcompat_v7\libs\android-support-v4.jar 
[2014-11-03 15:58:24 - Test] Length: 758727 
[2014-11-03 15:58:24 - Test] SHA-1: efec67655f6db90757faa37201efcee2a9ec3507 
[2014-11-03 15:58:24 - Test] Jar mismatch! Fix your dependencies 
[2014-11-03 15:58:35 - Test] Found 2 versions of android-support-v4.jar in the dependency list, 
[2014-11-03 15:58:35 - Test] but not all the versions are identical (check is based on SHA-1 only at this time). 
[2014-11-03 15:58:35 - Test] All versions of the libraries must be the same at this time. 
[2014-11-03 15:58:35 - Test] Versions found are: 
[2014-11-03 15:58:35 - Test] Path: C:\Users\Zain-ul-abdeen\workspace\Test\libs\android-support-v4.jar 
[2014-11-03 15:58:35 - Test] Length: 987314 
[2014-11-03 15:58:35 - Test] SHA-1: 9b6a9a9078af571732159b904ad423b03b7cc786 
[2014-11-03 15:58:35 - Test] Path: C:\Users\Zain-ul-abdeen\workspace\appcompat_v7\libs\android-support-v4.jar 
[2014-11-03 15:58:35 - Test] Length: 758727 
[2014-11-03 15:58:35 - Test] SHA-1: efec67655f6db90757faa37201efcee2a9ec3507 
[2014-11-03 15:58:35 - Test] Jar mismatch! Fix your dependencies 
[2014-11-03 15:58:35 - Test] Found 2 versions of android-support-v4.jar in the dependency list, 
[2014-11-03 15:58:35 - Test] but not all the versions are identical (check is based on SHA-1 only at this time). 
[2014-11-03 15:58:35 - Test] All versions of the libraries must be the same at this time. 
[2014-11-03 15:58:35 - Test] Versions found are: 
[2014-11-03 15:58:35 - Test] Path: C:\Users\Zain-ul-abdeen\workspace\Test\libs\android-support-v4.jar 
[2014-11-03 15:58:35 - Test] Length: 987314 
[2014-11-03 15:58:35 - Test] SHA-1: 9b6a9a9078af571732159b904ad423b03b7cc786 
[2014-11-03 15:58:35 - Test] Path: C:\Users\Zain-ul-abdeen\workspace\appcompat_v7\libs\android-support-v4.jar 
[2014-11-03 15:58:35 - Test] Length: 758727 
[2014-11-03 15:58:35 - Test] SHA-1: efec67655f6db90757faa37201efcee2a9ec3507 
[2014-11-03 15:58:35 - Test] Jar mismatch! Fix your dependencies 
[2014-11-03 15:58:47 - Test] Found 2 versions of android-support-v4.jar in the dependency list, 
[2014-11-03 15:58:47 - Test] but not all the versions are identical (check is based on SHA-1 only at this time). 
[2014-11-03 15:58:47 - Test] All versions of the libraries must be the same at this time. 
[2014-11-03 15:58:47 - Test] Versions found are: 
[2014-11-03 15:58:47 - Test] Path: C:\Users\Zain-ul-abdeen\workspace\Test\libs\android-support-v4.jar 
[2014-11-03 15:58:47 - Test] Length: 987314 
[2014-11-03 15:58:47 - Test] SHA-1: 9b6a9a9078af571732159b904ad423b03b7cc786 
[2014-11-03 15:58:47 - Test] Path: C:\Users\Zain-ul-abdeen\workspace\appcompat_v7\libs\android-support-v4.jar 
[2014-11-03 15:58:47 - Test] Length: 758727 
[2014-11-03 15:58:47 - Test] SHA-1: efec67655f6db90757faa37201efcee2a9ec3507 
[2014-11-03 15:58:47 - Test] Jar mismatch! Fix your dependencies 

首先,它是給ActionBarActivity的錯誤不能得到解決,我試圖通過增加外部罐來解決這些問題,然後這些錯誤來

+0

更新你的adt綁定 – 2014-11-03 11:08:39

+0

@Naveen你能解釋一下嗎? – 2014-11-03 11:11:09

+0

打開sdk管理器和更新的android sdk工具 – 2014-11-03 11:12:51

回答

7

刪除工作空間的jar文件就可以了

項目名稱>庫> Android的支持-V4

,去

appcompat_v7>庫> android- support-v4

複製此文件並將其粘貼到您的項目中 This pro塞斯將幫助你繞過關於這個問題的所有錯誤

+0

這個項目工作得很好:),但是我創建了一個新項目,它給了我錯誤的ActionBarActivity無法解決總共9個錯誤,我以前通過添加外部的jar來修復這些錯誤。我必須爲每個項目都做到這一點,或者有解決方案嗎? – 2014-11-03 11:28:36

+1

這是我用來複制粘貼jar文件的每個項目的臨時解決方案。後來我更新了我的ADT和SDK,我從來沒有遇到過這樣的問題。更新ADT並重新安裝Sdk將會訣竅。 **這是一個臨時快速解決方案** – Krishna 2014-11-03 11:38:21

+0

您能解釋我現在應該做什麼嗎? – 2014-11-03 11:40:39