ActionBarActivity无法解析为类型,Jar不匹配:Eclipse

时间:2014-11-03 11:07:22

标签: java android eclipse build

我是Android开发的新手,也是Eclipse的新手。每当我创建一个应用程序时,它只会给出错误

我的平台:

Android sdk-tools:23.0.5 Android sdkplatform-tools:21 Android sdkbuild-tools: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的错误无法解决,我试图通过添加外部jar解决它们然后出现这些错误

1 个答案:

答案 0 :(得分:7)

删除工作区中的jar文件将起到作用

  

的projectname>库>机器人支撑-V4

然后转到

  

appcompat_v7>库>机器人支撑-V4

复制此文件并将其粘贴到您的项目中 此过程将帮助您绕过有关此问题的所有错误