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 t
Resolution:
Just copy the library from one of the projects to the other one. Maybe the timestamp needs to be the same on both.
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.
This is a more elegant fix than deleting and adding files!
You just need to :
The Android Support Library will then be in sync (:
well.. it works for me:
Go to
Project folder > libs
then, delete "android-support-v4.jar"
Then
project > Clean
It will work!
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.