Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove item from "Android Private Libraries" that is not in my project's libs folder

The scenario is this: Eclipse Juno, ADT 22. The android project was created with a dependency on another Eclipse project (not an Android project, just a plain Java one) which exported a dependency on another library. I have since removed the Java project from the list of dependencies, but the exported library dependency remains in the Android Private Libraries section of my project's build path, and I can't figure out how to remove it.

Any ideas?

(For reference, here's what the build path looks like:

java build path dialog showing library

The lib I want to get rid of is "simple-xml-2.6.2.jar", as I've switched to using JSON rather than XML and no longer need it. The project "bincomodel" is no longer a dependency of this project; I removed it on the Projects tab.)

like image 379
Jules Avatar asked Feb 13 '14 03:02

Jules


2 Answers

In my case I had removed a few .jar libs from the file system however the project had not updated after doing SVN update.

Once I clicked on the libs folder the .jar flashed like it was there and then disappeared. So if you have this issue then try Right Click project > Refresh, this will update all folders with the underlying file structure.

Eclipse then auto updated to remove the files from the private libs build path.

A

like image 144
Aiden Fry Avatar answered Sep 19 '22 08:09

Aiden Fry


Turns out there are two places that the reference to the previous project needed to be deleted from, not just one. It had to be taken out of both the "Projects" tab on "Build Path" and out of "Project References" in the project properties.

I believe that ADT is automatically including any jars in the "libs" folder of any project included in the "Project References" list, whether or not they are an exported dependency. It also appears to link by default any jars that are in source folders, which eclipse standard doesn't do.

like image 25
Jules Avatar answered Sep 20 '22 08:09

Jules