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.
Above solutions mostly solve the problem. after using these solutions and problem persists. Then
GO to project folder -> libs-> and delete "android-support-v4.jar"
Hoping it would solve your problem as it solved my problem.
There are some scenarios where you have multiple library projects having the the android-support-v4.jar
in their libs
and build paths and your project has a dependency towards both of them. Say for example in my case I have the following library projects in my workspace,
Both these projects are independent and my project.properties
looks like the following,
# Project target.
target=android-17
android.library.reference.1=../libfacebook
android.library.reference.2=../libsherlockactionbar
When I build my project, I get a jar mismatch problem having duplicate references to two copies of the same file. What I did to solve this issue is a bit of trickery. I created a new library project named libcommons
as a parent to all the other library projects in my workspace, including libfacebook
and libsherlockactionbar
. Then I removed the support library from all other projects and kept only one copy inside libcommons
's libs folder. Then I have added libcommons
as a reference to all my other library projects. Once cleaned my workspace, everything works like a charm.
This is a more elegant fix than deleting and adding files!
You just need to :
The Android Support Library will then be in sync (:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With