Why SBT gives me "not found: object akka" with "import akka._"?

sbt, scala

Solution

The directory structure needs to look like this:

.
├── build.sbt
└── src
    └── main
        └── scala
            └── main.scala

And you have to launch `sbt` from the project's root directory (where the `build.sbt` file is).

Side note: If were to use a Scala build configuration instead of `build.sbt`, that would go in the `project` directory instead.

.
├── project
│   └── Build.scala
└── src
    └── main
        └── scala
            └── main.scala

Problem

I've the following `build.sbt` file: ``` name := "Stocks" version := "1.0" scalaVersion := "2.10.2" resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/" addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.2") libraryDependencies ++= Seq( "com.typesafe.akka" %% "akka-actor" % "2.2.3", "com.typesafe.akka" %% "akka-slf4j" % "2.2.3", "com.typesafe.akka" %% "akka-remote" % "2.2.3", "com.typesafe.akka" %% "akka-agent" % "2.2.3", "com.typesafe.akka" %% "akka-testkit" % "2.2.3" % "test" ) ``` When I `import akka._` in a `.scala` file I'm getting the error: ``` [error] /home.......stocks/src/main/scala/main.scala:3: not found: object akka [error] import akka._ ``` Why?

Original source