问题
I'm trying to use the Joda Time library for my Android app to have ISO 8601 formatted dates. I followed this guide to load it into my project and I've imported the classes I'm using. Eclipse seems to recognize everything just fine as it auto-completed my imports. But when I run, it seems unable to find something. The first message I see is this:
06-06 13:53:38.831: W/dalvikvm(4172): VFY: unable to find class referenced in signature (Lorg/joda/time/DateTime;)
followed by some more VFY messages, then this:
06-06 13:53:38.911: E/dalvikvm(4172): Could not find class 'org.joda.time.DateTime', referenced from method ...
and then this:
06-06 13:53:40.661: I/dalvikvm(4172): java.lang.NoClassDefFoundError: org.joda.time.DateTime
and the VM aborts
Is the guide that I followed for setting up Joda Time missing something? Any ideas what I could do to get this library working? Thank you.
回答1:
Make sure that you create a libs dir in your project directory and add the jar in there.
Then add the jar file as normal (in project properties)
来源:https://stackoverflow.com/questions/10922316/joda-time-in-eclipse-noclassdeffounderror