Java – how do I export jars from library projects to reference projects in eclipse?
Several Android projects use Android library projects Now I have added a jar (commons - lang. jar) to the library project I want to export this commons - lang. jar to all projects that use the library project I can't make it work without repeating jars to all referenced projects
What have I done so far
>Create a folder named LIBS in the library project folder hierarchy. > Copy the jars to this LIBS folder. > This jar is added to the "Java build path" of eclipse, which contains "add external jars..." to the library project. > On the order and export tab, select the check box to the left of the jar to export it. > In the reference item "add" library item on the "Android" page
It seems that the common Lang jar is not exported with the library project I also need to create a LIBS folder in the reference project and add the same jar to the build path of the reference project After that, everything is normal, but APK does contain external jars twice
What's wrong with my approach? What should I do?
Thank you in advance
Solution
I believe what you do is go to eclipse > Preferences > java > build path > user library Then when you add a jar file, I believe that all projects in the workspace will automatically have the jar in the classpath