[android] Jar mismatch! Fix your dependencies

Steps to reproduce:

  1. create a android project "MyApp"
  2. import ActionBarSherlock(ABS),Directional ViewPager(DVP), or any other open source library which use android support library.
  3. Add the libraries to the project "MyApp"

Console log:

[2013-04-17 14:27:12 - MyApp] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-04-17 14:27:12 - MyApp] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-04-17 14:27:12 - MyApp] All versions of the libraries must be the same at this time.
[2013-04-17 14:27:12 - MyApp] Versions found are:
[2013-04-17 14:27:12 - MyApp] Path: C:\Users\santhosh\My_Workspace\DVP_library\libs\android-support-v4.jar
[2013-04-17 14:27:12 - MyApp]   Length: 140011
[2013-04-17 14:27:12 - MyApp]   SHA-1: fc834ac8147bc4ed0b555f90f500a57d4232c448
[2013-04-17 14:27:12 - MyApp] Path: C:\Users\santhosh\My_Workspace\abs_library\libs\android-support-v4.jar
[2013-04-17 14:27:12 - MyApp]   Length: 271754
[2013-04-17 14:27:12 - MyApp]   SHA-1: 53307dc2bd2b69fd5533458ee11885f55807de4b
[2013-04-17 14:27:12 - MyApp] Jar mismatch! Fix your dependencies

I know i am suppose to delete android-support-v4.jar from libs folder and keep only one copy for all. But, that is not solving my problem.

When i try to delete the android-support-v4.jar from MyApp, it gives me the following error.

 Problems encountered while deleting resources.
 Could not delete 'C:\Users\santhosh\My_Workspace\MyApp\libs\android-support-v4.jar'.

When I try to delete the android-support-v4.jar from ABS, it gives me the following error

 ????? cannot be resolved to a type error.

I have tried to clean the project, Fix Project Properties. Restart eclipse, Build, import and add again. I have tried to copy the support jar in libs folder from one library to other. delete the support jar in both libraries and add it to the MyApp project. Nothing has worked for me.

if i try to add single library, it works fine. i am facing the problem when trying to add 2 or more libraries to a single project.

error getting when I add two libraries in MyApp:

The project was not built since its build path is incomplete. 
Cannot find the class file for android.support.v4.app.FragmentActivity. 
Fix the build path then try building this project MyApp Unknown Java Problem
The type android.support.v4.app.FragmentActivity cannot be resolved. It is indirectly referenced from required .class files MyActivity.java/MyApp/src/com/santhosh/myapp    line 10 Java Problem
Jar mismatch! Fix your dependencies MyApp Unknown Android Dependency Problem

This question is related to android eclipse jar

The answer is


Use a Library Project just for the Support Library

As of ADT 22, using Eclipse Juno

I don't think any of the above are really the best answers. I also don't think it is recommended to use the external jar function in Eclipse anymore (AFAIK).

Rather, what worked for me is to create a separate empty library project.

Then use Android tools > Add Support Library to get the latest version you need or want.

Then remove the support lib jar from all other projects.

Finally, for every project that requires it, add a reference to your new Library project

(project properties) > Android > (Library box) > Add...

Then all your projects will have a single source to use and update the support library. This also makes javadocs easier to get working.

For info on how to setup the javadocs see:

How to attach javadoc or sources to jars in libs folder?


I think you create a new workspace and import all project properly with his lib and also add external jar android-support-v4.jar in adb bundle in sdk extra files. I think its work for you. Hope all the best

And also use the android support lib it may be help you and also update your adt bundle


Actionbarsherlock has the support library in it. This probably causes a conflict if the support library is also in your main project.

Remove android-support-v4.jar from your project's libs directory.

Also Remove android-support-v4.jar from your second library and then try again.

Jar Mismatch Found 2 versions of android-support-v4.jar in the dependency list


  1. Jar mismatch comes when you use library projects in your application and both projects are using same jar with different version so just check all library projects attached in your application. if some mismatch exist then remove it.

  2. if above process is not working then just do remove project dependency from build path and again add library projects and build the application.


Remove android-support-v4.jar file from the libs folder from your project.


Don't Include the android-support-v4 in the library , instead you can add it to your project as an external jar using build path menu > add external jar

Sometimes you have to clean your project.


I agree with pjco. The best way is the official method explained in Support Library Setup in the tutorial at developer.android.com.

Then, in the Eclipse "package explorer", expand your main project and delete android-support-v4.jar from the "libs" folder (as Pratik Butani suggested).

This worked for me.


I believe you need your support package in both Library and application. However, to fix this, make sure you have same file at both locations (same checksum).

Simply copy the support-package file from one location and copy at another then clean+refresh your library/project and you should be good to go.


Right click on your project -> Android Tool -> Add support library


In my case there was another directory within my workspace, having the same jar file as the one in my project. I hadn't created that directory or anything in it. It was created by Eclipse I believe. I just erased that directory and it just runs ok.


Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to jar

Running JAR file on Windows 10 Add jars to a Spark Job - spark-submit Deploying Maven project throws java.util.zip.ZipException: invalid LOC header (bad signature) java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonFactory Maven Error: Could not find or load main class Where can I download mysql jdbc jar from? Access restriction: The type 'Application' is not API (restriction on required library rt.jar) Create aar file in Android Studio Checking Maven Version Creating runnable JAR with Gradle