Several Android projects use a Android library project. Now I added a JAR (commons-lang.jar) to this library project. I want to export this commons-lang.jar to all projects that use the library project. I can't get it to work without duplicating the jar to all referencing projects.
What I did so far:
- Created a folder named libs within the library projects folder hierarchy.
- Copied the JAR to this libs folder.
- Added this JAR in the Eclipse "Java Build Path" with "Add external JARs..." to the library project.
- On the "Order and Export" tab selected the checkbox to the left of the JAR to export it.
- On the referencing project on the "Android" page "Add" library project.
It seems that the commans-lang JAR is not exported with the library project. I need to create the libs folder on the referencing project as well, add the same JARs to the build path of the referencing project. After that everything works but the APK does contain that external JAR twice.
What's wrong with my approach? What should I do in addition?
Many thanks in advance.