android - Jar mismatch - android-support-v4.jar

时间:2015-12-08 12:23:35

标签: android eclipse jar android-appcompat

我已经使用Eclipse多年,并且不时在Android中开发应用程序。直到现在没有严重的问题 - 我不知道这是什么来的? 我的旧项目还可以,但是一旦我启动一个新的android应用程序项目,我就会收到以下错误

我知道之前已经问过这个问题,但我找不到任何解决方案

[2015-12-08 12:58:37 - test_android]    Length: 758727
[2015-12-08 12:58:37 - test_android]    SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
[2015-12-08 12:58:37 - test_android] Jar mismatch! Fix your dependencies
[2015-12-08 12:58:39 - test2_dec08] ERROR: In <declare-styleable> MenuView,  unable to find attribute android:preserveIconSpacing
[2015-12-08 12:58:45 - test_android] ERROR: In <declare-styleable> MenuView, unable to find attribute android:preserveIconSpacing
[2015-12-08 12:59:07 - testtest_] Found 2 versions of android-support-v4.jar in the dependency list,
[2015-12-08 12:59:07 - testtest_] but not all the versions are identical (check is based on SHA-1 only at this time).
[2015-12-08 12:59:07 - testtest_] All versions of the libraries must be the same at this time.
[2015-12-08 12:59:07 - testtest_] Versions found are:
[2015-12-08 12:59:07 - testtest_] Path: C:\Users\john\workspace\testtest_\libs\android-support-v4.jar
[2015-12-08 12:59:07 - testtest_]   Length: 1364881
[2015-12-08 12:59:07 - testtest_]   SHA-1: 91a1b1aabf740a6f64c2f73f5b0dc6611779ac8b
[2015-12-08 12:59:07 - testtest_] Path: C:\Users\john\workspace\appcompat_v7\libs\android-support-v4.jar
[2015-12-08 12:59:07 - testtest_]   Length: 758727
[2015-12-08 12:59:07 - testtest_]   SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
[2015-12-08 12:59:07 - testtest_] Jar mismatch! Fix your dependencies
[2015-12-08 12:59:07 - testtest_] ERROR: In <declare-styleable> MenuView, unable to find attribute android:preserveIconSpacing
[2015-12-08 12:59:10 - testtest_] ERROR: In <declare-styleable> MenuView,   unable to find attribute android:preserveIconSpacing

我尝试了这个帖子的答案之一

android-support-v4.jar dependency error

即为实际项目和项目appcompat_v7提供支持库

但现在较旧的项目也不会工作

非常感谢帮助!!!

3 个答案:

答案 0 :(得分:0)

在Eclipse中,对于C:\ Users \ john \ workspace \ appcompat_v7 \ libs,你的android支持jar是旧的。右键单击Project,单击Android支持工具 - > AddSuportLibrary。错误将被解决。

更新SDK。

答案 1 :(得分:0)

appcompat_v7 项目导入库时, appcompat_v7 中也包含 android-support-v4.jar ,因此您必须删除<您的项目/ lib文件夹中的strong> android-support-v4.jar 已经在 appcompat_v7 项目中,然后清理项目并重建项目。

答案 2 :(得分:0)

你已经将一些项目导入到你自己创建的投影中,但是它们都有相同的库但不同的签名请使用任何一个副本从同一个中替换