Reputation: 15199
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:
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.)
Upvotes: 13
Views: 13054
Reputation: 1715
Edit the file project.properties in your filesystem and delete what you need. In my case I removed gridlayout_v7 deleting the second line:
# Project target.
target=android-15
android.library.reference.1=../appcompat_v7
android.library.reference.2=../gridlayout_v7
Upvotes: 0
Reputation: 15297
I suppose you could try to delete the unnecessary dependency
from appropriate .classpath
, afaik this path is not recommended.
Upvotes: 0
Reputation: 21
exit eclipse and go to folder your_project/libs/. Delete file .jar you want.
Upvotes: 1
Reputation: 1682
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
Upvotes: 16
Reputation: 15199
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.
Upvotes: 3