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

标签 java android eclipse build

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

我的平台:

Android SDK 工具:23.0.5 Android SDK 平台工具:21 Android SDK 构建工具: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 来解决它们,然后出现了这些错误

最佳答案

删除工作空间中的 jar 文件即可解决问题

projectname>libs>android-support-v4

然后去

appcompat_v7>libs>android-support-v4

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

关于java - ActionBarActivity 无法解析为类型,Jar 不匹配 : Eclipse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26712932/

相关文章:

Java getResource 路径错误

java - 为什么这个 messageListener 不工作?

java - "May 28, 2013 6:04:38 PM"是什么格式?

android - 将 SQLite 与外部 SQL 数据库服务器同步

android - Android中的bin文件夹是什么?

java - 了解如何设置 Cloud Firestore 数据库

java - 改变 RadialGradient,渐变位置?

android - RecyclerView 中不正确的图像回收

eclipse - 在 Eclipse 中的包资源管理器中,我可以按名称查找文件吗?

java - 在 Android Eclipse 中将光标值添加到 ArrayList 中