在 Eclipse 中添加库时出现 Jar 不匹配错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12540071/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Jar mismatch error when adding library in eclipse
提问by Mr. Bojangles
I am new to Android and I am trying to add a library for viewPagerIndicator as this tutorialinstructs me to do. However, when I add the library I get an error stating:
我是 Android 新手,我正在尝试为 viewPagerIndicator 添加一个库,因为本教程指示我这样做。但是,当我添加库时,我收到一条错误消息:
Versions found are:
Path: C:\Users\Bryan\workspace\MyPager\libs\android-support-v4.jar
Length: 349252
SHA-1: 612846c9857077a039b533718f72db3bc041d389
Path: C:\Users\Bryan\git\Android-ViewPagerIndicator\library\libs\android-support-v4.jar
Length: 271754
SHA-1: 53307dc2bd2b69fd5533458ee11885f55807de4b
Jar mismatch! Fix your dependencies
How do I resolve this without messing up my build path?
如何在不弄乱构建路径的情况下解决此问题?
回答by James McCracken
Looks like it found the library twice. You need to delete one.
看起来它两次找到了图书馆。你需要删除一个。
回答by Huy Tower
You are using two different revisions of the support library. Delete all of the support library jarsand re-copythem into your app (and any other dependencies, if have).
您正在使用支持库的两个不同版本。删除所有支持库罐子和再复制他们到你的应用程序(和任何其他依赖关系,如果有)。
The android-support-v4.jar will be compiledagain automatically.
在Android的支持,v4.jar将被编译再次打开。
Edit : Should remove Android Dependencies and Android Private Librariesin Librariesindex in Java Build Path
编辑:应该在Java 构建路径中的库索引中删除 Android 依赖项和 Android 私有库
回答by Addon.mahesh
Try to remove unnecessary .jar file of libs folder from your Android project.
尝试从您的 Android 项目中删除 libs 文件夹中不必要的 .jar 文件。