Joda Time in Eclipse: NoClassDefFoundError

ε祈祈猫儿з 提交于 2020-01-04 03:24:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!