简单地将示例从github示例复制到我的项目中后,我将收到以下错误。我能够编译github示例项目。我觉得sbt一定把我搞砸了。我正在使用sbt 0.13
[error] .scala:13: too many arguments for constructor Object: ()Object
[error] class Suppliers(tag: Tag) extends Table[(Int, String, String, String, String, String)](tag, "SUPPLIERS") {
[error] ^
[error].scala:14: object column does not take type parameters.
[error] def id = column[Int]("SUP_ID", O.PrimaryKey) // This is the primary key column我的build.sbt看起来就像
导入AssemblyKeys._
将:=命名为“我的项目”
版本:= "1.0“
scalaVersion := "2.10.3“
assemblySettings
seq(Revolver.settings:_*)
libraryDependencies <+= (scalaVersion)("org.scala-lang“%”scala-编译器“% _)
解析器+= "http://oss.sonatype.org/content/repositories/snapshots/“中的"Sonatype快照”
解析器+= "Typesafe Repository“at "http://repo.typesafe.com/typesafe/releases/”
解析器+=在"http://oss.sonatype.org/content/repositories/releases“中的”奏鸣器版本“
解析器+= "CDH4“at "https://repository.cloudera.com/artifactory/cloudera-repos/”
解析器+= "glassfish“at "https://repository.jboss.org/nexus/content/repositories/glassfish”
解析器+=“喷雾回购”在"http://repo.spray.io“
解析器+=在"http://repo.anormcypher.org/“处的”非正态密码“
libraryDependencies +="com.typesafe.akka“%”akka-演员“% "2.2.0”
libraryDependencies +="com.typesafe.akka“% "akka-testkit”% "2.2.0“
libraryDependencies +="com.typesafe.akka“% "akka-transactor”% "2.2.0“
libraryDependencies += "io.spray“%”喷雾罐“% "1.2-RC2”
libraryDependencies += "io.spray“%”喷雾路由“% "1.2-RC2”
libraryDependencies += "io.spray“%”喷雾测试试剂盒“% "1.2-RC2”
libraryDependencies += "io.spray“%”喷雾-json“% "1.2.3”
libraryDependencies += "org.scalatest“% "scalatest_2.10”% "1.9.2“
libraryDependencies += "org.anormcypher“%”匿名密码“% "0.4.4”
libraryDependencies += "com.h2database“% "h2”% "1.3.166“
libraryDependencies += "com.typesafe.slick“% "slick”% "2.0.0-M3“
libraryDependencies += "org.postgresql“% "postgresql”%“9.2-1002-jdbc 4”
发布于 2013-12-12 19:35:08
你们的进口是错的。似乎你使用了一些工具来根据它们的名字自动完成它们(或者你在胡思乱想)。在任何情况下,您都会导入错误的东西。只要进口
import scala.slick.driver.H2Driver.simple._
你已经准备好了。请参阅http://slick.typesafe.com/doc/2.0.0-M3/gettingstarted.html#imports
https://stackoverflow.com/questions/20535602
复制相似问题