When I highlight my project, go to properties, select java build path and then try to remove an Android Dependency from my list of Android dependencies the remove button is grey'd out. How can I remove that specific dependency?
4 Answers
JFTR:
I have had similar problem after a messed merge of two projects branches on Eclipse. I could revert the merge as I did not commited yet, but Eclipse project files that I do not store in my repository was messed.
The solution for me was to:
- Delete the error message from "Problems" view.
- Clean the project (Project / Clean...)
Solved!

- 4,897
- 7
- 44
- 62

- 4,293
- 1
- 37
- 53
-
I found that selecting the folder in the package explorer (src in my case), and refreshing (F5) got rid of the link to the jar file I removed earlier. Clean build, and then my errors disappeared. – skymook Oct 23 '12 at 16:29
-
1Oh, I just read your answer and was going to try with my eclipse. And errors in "Problems" suddenly disappeared before I do anything. Magic answer! – xgdgsc Mar 30 '13 at 14:42
-
Good work, as you describe this problem was caused after a merge of two projects. =) – Jorgesys Oct 01 '13 at 03:22
Delete the dependency from the libs folder.

- 15,724
- 7
- 46
- 95
-
The Android Dependencies folder is added by ADT and it is obtained from the classpath com.android.ide.eclipse.adt.LIBRARIES. If the dependency you are trying to remove is part of the core libraries, it may not be possible. Which dependency are you trying to remove? – Rajesh Apr 25 '12 at 14:08
-
2ok so instead of deleting it I just put a blank .jar file there instead. it worked ;3. – jimbob Apr 25 '12 at 16:22
-
2a 0 kb file with the same name didn't work for me, so I opened up the jar and deleted the classes. – MathiasTCK Sep 20 '12 at 20:01
-
-
right click on project name ->properties ->Java buildpath ->projects – Ajay Takur Mar 10 '15 at 22:37
Well, the above solutions didn't work for me so I just enter the project.properties file and remove the dependency (which is written there as a reference).
These are the steps on Ubuntu:
- Using console on project root folder type
sudo vi project.properties
- Go to the line that you want to remove and delete it (you can type double d to remove a line -->
dd
) - Close and save the file (press ESC and then
wq
) - Clean the project and rebuild.
Note: Before you change project.properties manually you are strongly advised to backup your project since this operation is unsafe!!!
Sorry for the elaboration for those who speak fluent Linux.

- 3,280
- 2
- 18
- 17
2 types of dependencies I can found so far under Android Dependencies:
- Build path to your workspace libs folder
- Build path to some other project which install by Android tools and create as another project under Eclipse, e.g. GridLayout for android(android-support-v7-gridlayout.jar)
To remove the first one, it is easy. Just delete the jars under libs folder. To remove the second one, it is also easy. Just go to the project's Build Path, select Android, remove the reference item under Library panel