【问题标题】:Play framework errors in build.sbt在 build.sbt 中播放框架错误
【发布时间】:2018-04-18 07:09:50
【问题描述】:

这是我的 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

此外,当自动更正无法识别我所有对象的类型(例如数据框)时,它会显示“任何”。为什么会这样?

【问题讨论】:

    标签: playframework sbt


    【解决方案1】:

    要在您的项目中启用插件PlayScala,您必须添加:

    addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.13")
    

    到文件<root_project_dir>/project/plugins.sbt(如果不存在,你应该创建这个文件)

    【讨论】:

    • 它存在,这正是它的内容
    猜你喜欢
    • 2014-05-18
    • 1970-01-01
    • 1970-01-01
    • 2015-09-19
    • 1970-01-01
    • 2016-02-16
    • 2015-07-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多