0

I'm trying to import an akka dependency to my project using sbt.

The akka modules I need are akka-actor and akka-remote. The curious thing is that akka-actor has no problems importing, but the remote module appears as an unknown artifact.

I'm using IntelliJ and scala 2.12.1. Does someone have this problem or can help me in any way?

enter image description here

PablodeAcero
  • 399
  • 8
  • 20
  • just ignore IntelliJ. Always trust sbt. And as far as IntelliJ is concerned... enable `auto-import` in your project. – sarveshseri Apr 26 '17 at 11:17
  • The thing is that when I run the code, it gives an `java.lang.ClassNotFoundException: akka.actor.Scope` error, so I can't ignore it... – PablodeAcero Apr 26 '17 at 12:48

1 Answers1

2

Try leave a blank line between the two libraryDependencies:

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

libraryDependencies += "com.typesafe.akka" %% "akka-remote" % "2.5.0"

Or keep them in a Seq:

libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-actor" % "2.5.0",
  "com.typesafe.akka" %% "akka-remote" % "2.5.0"
)
Leo C
  • 22,006
  • 3
  • 26
  • 39
  • Does it work if you run `sbt` in command line? If yes, the issue is `IntelliJ` specific, in which case this StackOverflow [Q&A](http://stackoverflow.com/questions/41372978/unknown-artifact-not-resolved-or-indexed-error-for-scalatest) might be of interest. – Leo C Apr 26 '17 at 16:07