这是我的build.sbt文件:
name := """play-scala-starter-example"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
resolvers += Resolver.sonatypeRepo("snapshots")
scalaVersion := "2.11.5"
libraryDependencies += guice
dependencyOverrides+= "com.fasterxml.jackson.core" % "jackson-databind" % "2.6.5"
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
libraryDependencies += "com.h2database" % "h2" % "1.4.196"
libraryDependencies += "org.apache.spark" %% "spark-core" % "2.2.0"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.2.0"
libraryDependencies += "org.apache.spark" %% "spark-hive" % "2.2.0"
libraryDependencies +="org.apache.spark" %% "spark-yarn" % "2.2.0"
我收到了下一个错误:
cannot resolve symbol PlayScala and guice
and on all rows I'm getting "Expression type Def.Settings(Seq[ModuleID]] must conform to DslEntry in sbt.file
此外,当自动更正无法识别所有对象的类型(例如数据帧)时,它会显示"任何"
知道为什么吗?
答案 0 :(得分:0)
要在项目中启用插件PlayScala
,您必须添加:
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.13")
到文件<root_project_dir>/project/plugins.sbt
(如果不存在,则应创建此文件)