首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >对象时间不是package org.joda的成员

对象时间不是package org.joda的成员
EN

Stack Overflow用户
提问于 2019-06-20 19:33:46
回答 1查看 1.1K关注 0票数 2

我正在学习scala跟随这个带有docker image hseeberger/scala-sbt的tutorial

使用build.sbt的第一个版本

libraryDependencies += "joda-time" % "joda-time" % "2.10.2"

一切都很好。

这段代码(snippet_1)

import org.joda.time._
var dt = new DateTime

我得到了我想要的。

使用build.sbt的第二个版本

libraryDependencies ++= Seq{
    "joda-time" % "joda-time" % "2.10.2";
    "org.joda" % "joda-convert" % "2.2.1"
}

snippet_1收到此错误

<console>:7: error: object time is not a member of package org.joda
       import org.joda.time._
                       ^

与那个tutorial的唯一区别是,我在build.sbt中用;替换了,,因为,会导致错误。

此命令来自此post

sbt eclipse

导致此错误

[warn] Executing in batch mode.
[warn]   For better performance, hit [ENTER] to switch to interactive mode, or
[warn]   consider launching sbt without any commands, or explicitly passing 'shell'
[info] Loading project definition from /root/project
[info] Set current project to root (in build file:/root/)
[error] Not a valid command: eclipse (similar: help, alias)
[error] Not a valid project ID: eclipse
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: eclipse (similar: deliver, licenses, clean)
[error] eclipse
[error]        ^

有什么想法吗?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56685088

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档