【问题标题】:error: not found: object play错误:未找到:对象播放
【发布时间】:2017-12-27 08:39:54
【问题描述】:

实际上是在学习如何使用 scala 进行编码,我需要一些帮助:

import play.api.libs.json._
case class Alert(email: String, query: String)
 {
   def main(args: Array[String]): Unit = { println("Hello from main of class")}
}

我收到一条错误消息:

Alert.scala:2: error: not found: object play
import play.api.libs.json._

One error found

我不知道问题出在哪里,我更新了 IntelliJ,甚至在我的 build.sbt 中添加了缺少的库依赖项

name := """alert"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
jdbc,cache,ws,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test,
"org.tpolecat" %% "doobie-core"      % "0.4.1",)

【问题讨论】:

    标签: scala playframework sbt


    【解决方案1】:

    我很确定他们在这个相关问题中解释得很好:

    object play not found in scala application

    【讨论】:

      猜你喜欢
      • 2013-09-21
      • 2019-12-18
      • 2013-02-20
      • 2017-08-26
      • 2013-11-25
      • 2012-10-13
      • 1970-01-01
      • 2018-12-18
      • 2016-08-05
      相关资源
      最近更新 更多