Daniel
Daniel

Reputation: 137

Object is not a member of package akka

trying to do my first steps with Scala, sbt and akka.

I'd like to import the akka.actor_ package to my script.

My build.sbt looks like this:

name := "hello"

version :="1.0"

scalaVersion := "2.12.3"

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.5.4"

Stacktrace: enter image description here

Any idea or hint on how to avoid this error and correctly import the needed package?

Thank you in advance for your help!

Upvotes: 1

Views: 2775

Answers (1)

Jeffrey Chung
Jeffrey Chung

Reputation: 19527

There is a small typo in your import statement. It should be:

import akka.actor._

Notice the dot between actor and _.

Also, I don't know whether this is another typo, but you should use the latest version, 2.5.4, instead of 2.4.4.

Upvotes: 2

Related Questions