我正在使用Scala和Joda时间,但是我不能使用大多数方法.
I'm using Scala and Joda time, but I can't use most methods.
例如,这很好用
var now = DateTime.now()但这不是
var now = DateTime.now() var then = now.plusHours(2)类型值plusHours不是org.joda.time.DateTime的成员
如果我建造,我还会收到以下错误:
If i build i receive also these errors:
加载DateTime时出错,缺少依赖项'org.joda.convert.FromString类',C:\ Documents and Settings \ Vallo \ Mis documentos \ Downloads \ joda-time-2.2.jar(org/joda/time /DateTime.class)TP4未知Scala问题
error while loading DateTime, Missing dependency 'class org.joda.convert.FromString', required by C:\Documents and Settings\Vallo\Mis documentos\Downloads\joda-time-2.2.jar(org/joda/time/DateTime.class) TP4 Unknown Scala Problem
加载DateTimeZone时出错,缺少依赖项'org.joda.convert.FromString类',C:\ Documents and Settings \ Vallo \ Mis documentos \ Downloads \ joda-time-2.2.jar(org/joda/time /DateTimeZone.class)TP4未知Scala问题
error while loading DateTimeZone, Missing dependency 'class org.joda.convert.FromString', required by C:\Documents and Settings\Vallo\Mis documentos\Downloads\joda-time-2.2.jar(org/joda/time/DateTimeZone.class) TP4 Unknown Scala Problem
错误,缺少依赖项类org.joda.convert.ToString",C:\ Documents and Settings \ Vallo \ Mis documentos \ Downloads \ joda-time-2.2.jar(org/joda/time /base/AbstractInstant.class)TP4未知Scala问题
error while loading AbstractInstant, Missing dependency 'class org.joda.convert.ToString', required by C:\Documents and Settings\Vallo\Mis documentos\Downloads\joda-time-2.2.jar(org/joda/time/base/AbstractInstant.class) TP4 Unknown Scala Problem
(文件C:\ Documents and Settings \ Vallo \ Mis documentos \ Downloads \ joda-time-2.2.jar存在)
(the file C:\Documents and Settings\Vallo\Mis documentos\Downloads\joda-time-2.2.jar exists)
但是,诸如DateTime.isBefore或.isAfter之类的方法可以正常工作.我感觉到静态方法是唯一对我有用的方法,但是我不确定.
However, methods like DateTime.isBefore or .isAfter works fine. I've got the feeling that static methods are the only one that work for me, but I'm not sure.
有任何线索吗?非常感谢.
Any clues? Thanks a lot.
推荐答案似乎您可能需要添加 joda-convert 也作为依赖项.
It seems that you might need to add joda-convert as a dependency too.
更多推荐
类型值plusHours不是org.joda.time.DateTime的成员
发布评论