Search code examples
javaandroideclipseclassnotfoundexception

classdefnotfound error in eclipse (strange)


I am getting a classdefnotfound error at runtime for my Android app. Everything runs fine except this one class. Previously this class worked. The class is actually in an external library and all libraries are correct. Has anyone run across any thing like this in eclipse? I feel like it is an environment problem.

The class is in google api client library version 1.4.1.

classdefnotfound: com.google.api.client.xml.XmlNamespaceDictionary;

The jar file is in the lib directory and in the .classpath file.


Solution

  • Ok, I've figured it out(after 8 hours of hair pulling!). The google client lib jar files were located in another project(the one that was working). I had added them to the project as a referenced library. For some reason it was not getting added at compile time. Solution: copied the actual jar files to the /lib directory and update the build path in eclipse by removing the referenced libs