2014-11-03 52 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