What is Android Dependencies? Remove it from Build Path, ClassNotFoundException occurs
Asked Answered
B

4

8

I'm working on a team project. I included a .jar file in Build Path and committed to SVN. When I updated code in my working directory, a new folder appears in Eclipse called "Android Dependencies". If I let it be there, my program runs; If I remove it, my program reports a ClassNotFoundException.

Now how to fix this ClassNotFoundException?

Bittencourt answered 28/5, 2012 at 5:47 Comment(0)
C
7

Android Dependencies is a virtual folder where Eclipse shows what JAR files the project depends on. It's not a physical folder; you won't find it on your hard disk. And the folder is not checked in into Subversion.

Do not delete that folder. You will destroy your project.

To fix it, just revert to an older Subversion revision and check it in again.

Clew answered 28/5, 2012 at 5:54 Comment(5)
Why don't I see it in some projects, sometimes I see it? Can you give me a reference link about it? I googled "Android Dependencies" but no site tell what it really is.Bittencourt
Updating doesn't recover it, I must delete it from local and re-update.Bittencourt
The folder renamed and extended with revision 17 of the SDK (see Dealing with dependencies in Android projects). So it depends on the revision of the SDK.Clew
In the current version, just restarting Eclipse will re-create the "folder".Trimorphism
@Codo, Where does Eclipse store these "dependencies" information at?Hensley
G
42

For the people whose heart dropped when they read the comment that deleting the Android Dependencies virtual folder will destroy your project, there is an easy fix.

  1. Right click on the destroyed project
  2. Select "Android Tools > Fix Project Properties" in the dropdown

I hosed my project dependencies when trying to set up my git repo, and this is fixed it.

Generalissimo answered 5/10, 2012 at 1:26 Comment(0)
C
7

Android Dependencies is a virtual folder where Eclipse shows what JAR files the project depends on. It's not a physical folder; you won't find it on your hard disk. And the folder is not checked in into Subversion.

Do not delete that folder. You will destroy your project.

To fix it, just revert to an older Subversion revision and check it in again.

Clew answered 28/5, 2012 at 5:54 Comment(5)
Why don't I see it in some projects, sometimes I see it? Can you give me a reference link about it? I googled "Android Dependencies" but no site tell what it really is.Bittencourt
Updating doesn't recover it, I must delete it from local and re-update.Bittencourt
The folder renamed and extended with revision 17 of the SDK (see Dealing with dependencies in Android projects). So it depends on the revision of the SDK.Clew
In the current version, just restarting Eclipse will re-create the "folder".Trimorphism
@Codo, Where does Eclipse store these "dependencies" information at?Hensley
C
2

I've had a similar problem after setting up a git repo with my project.

The problem was that the appcompat import lost its folder reference.

If the 'Fix Project Properties' mentioned doesn't work for you try this:

  1. Go to Project > Properties
  2. Go to the 'Android' tab
  3. Under 'Libraries', if there's a red 'X' next to the appcompat folder, remove it then hit 'add' and add it in again. The reference should show a green tick now.
  4. Save and clean the project if needs be
Connected answered 31/8, 2014 at 0:20 Comment(0)
K
1

If you also have marked project build target below API level 16 in the Android project properties, the error is going to come because prior to this level, there was no Android dependencies.

Kirk answered 8/7, 2014 at 7:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.