scala:运行play slick示例会导致导入错误

scala:运行play slick示例会导致导入错误,scala,slick,play-slick,Scala,Slick,Play Slick,这里绝对是初学者。我在macOS X中安装了scala 2.12.1 我正在尝试设置示例计算机数据库播放来自 当我将cd放入计算机数据库后,我运行了sbt run,结果导致以下错误: error: not found: value PlayKeys "PlayKeys.playOmnidoc := false" 以下是文件夹根目录下build.sbt的默认内容: name := "computer-database-sample" PlayKeys.playOmnidoc := false

这里绝对是初学者。我在macOS X中安装了scala 2.12.1

我正在尝试设置示例
计算机数据库
播放来自

当我将
cd
放入计算机数据库后,我运行了
sbt run
,结果导致以下错误:

error: not found: value PlayKeys "PlayKeys.playOmnidoc := false"
以下是文件夹根目录下
build.sbt
的默认内容:

name := "computer-database-sample"
PlayKeys.playOmnidoc := false
在PlayKeys调用之前,我尝试将以下行添加到
build.sbt
以显式导入play slick:

libraryDependencies ++= Seq(
    "com.typesafe.slick" %% "slick" % "2.0.0",
    "com.typesafe.play" %% "play-slick" % "0.6.0.1",
    "com.typesafe.slick" %% "slick-extensions" % "3.1.0"
)
但我还是犯了同样的错误


我遗漏了什么吗?这就是scala项目应该如何设置的吗?

停止您正在进行的任何修改,恢复它们(您需要从repo获得干净的版本)

执行以下操作(不是最快的根,而是允许您边走边探索其他方面的根):

1) 转到repo根目录

2) 类型:
sbt
-如果它不工作,请先安装
sbt

3) 成功完成第2点后,您应该看到以下内容:

[pdolega@maracuja play-slick]$ sbt
[info] Loading project definition from /home/pdolega/projects/slick/play-slick/project
[info] Compiling 1 Scala source to /home/pdolega/projects/slick/play-slick/project/target/scala-2.10/sbt-0.13/classes...
Missing bintray credentials /home/pdolega/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /home/pdolega/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /home/pdolega/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /home/pdolega/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /home/pdolega/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /home/pdolega/.bintray/.credentials. Some bintray features depend on this.
[info] Set current project to play-slick-root (in build file:/home/pdolega/projects/slick/play-slick/)
>

4) 类型:
项目
。您将看到所有
sbt
子项目:

> projects
[info] In file:/home/pdolega/projects/slick/play-slick/
[info]     basic-sample
[info]     computer-database-sample
[info]     docs
[info]     iteratee-sample
[info]     play-slick
[info]     play-slick-evolutions
[info]   * play-slick-root
[info]     samples
> 
4) 键入
项目计算机数据库示例
> project computer-database-sample
[info] Set current project to computer-database-sample (in build file:/home/pdolega/projects/slick/play-slick/)
[computer-database-sample] $
[computer-database-sample] $ run
[warn] Credentials file /home/pdolega/.bintray/.credentials does not exist

--- (Running the application, auto-reloading is enabled) ---

[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Ctrl+D to stop and go back to the console...)