user4936238
user4936238

Reputation:

error: not found: object play

Actually learning how to code with scala, I need some help on this:

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

I've got an error message :

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

One error found

I don't know where the problem come, I updated IntelliJ, and even added the missing library Dependencies in my 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",)

Upvotes: 2

Views: 2185

Answers (1)

Thomas V
Thomas V

Reputation: 151

I'm quite sure they explained it very well in this related question:

object play not found in scala application

Upvotes: 1

Related Questions