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

Zaheer picture Zaheer · Aug 20, 2012 · Viewed 92.7k times · Source

I am trying to create 2 versions of an Android app (free/paid). I have an Android Library that contains files common to both. I created a new Android project and am trying to use the Library but get the error below:

Found 2 versions of android-support-v4.jar in the dependency list,
but not all the versions are identical (check is based on SHA-1 only at this time).
All versions of the libraries must be the same at this time.
Versions found are:
Path: /Users/Zaheer/Developer/App Free/libs/android-support-v4.jar
    Length: 349252
    SHA-1: 612846c9857077a039b533718f72db3bc041d389
Path: /Users/Zaheer/Developer/App Library/libs/android-support-v4.jar
    Length: 337562
    SHA-1: 27c24d26e4c5d57976e6926367985548678e913c

Any ideas on how to resolve this? I've been playing with the build path to no success.

Answer

CommonsWare picture CommonsWare · Aug 20, 2012

Any ideas on how to resolve this?

Delete one.

I've been playing with the build path to no success.

Step #1: Undo all that. If you are messing with the build path, on R16 or higher version of the ADT plugin for Eclipse, you're doing it wrong.

Step #2: Pick one of those two versions of the JAR, or pick the one from the "extras" area of your SDK installation.

Step #3: Put the right JAR in App Library.

Step #4: Delete the one from App Free, since it will pick up that JAR from App Library.

You are welcome to instead have the same actual JAR file in both spots (App Free and App Library), though that just takes up extra space for no reason.