小编Sai*_*aif的帖子

java.lang.NoSuchMethodError:akka.actor.ActorCell.addFunctionRef

我正在尝试建立一个简单的akka​​-http 2.4.2项目来对其进行测试,但是我没有这样做。

我的built.sbt:

import NativePackagerHelper._

lazy val akkaVersion = "2.4.2"

lazy val root = (project in file(".")).
settings(
name := "akkTest",
version := "0.1",
scalaVersion := "2.11.7")

libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-http-spray-json-experimental" % akkaVersion
)

enablePlugins(JavaServerAppPackaging)
Run Code Online (Sandbox Code Playgroud)

我在Main.scala中的代码段

import akka.http.scaladsl.Http
import akka.stream.ActorMaterializer
import akka.stream.scaladsl._
import akka.actor.ActorSystem


object Main extends App {

implicit val system = ActorSystem()
implicit val materializer = ActorMaterializer()
implicit val ec = system.dispatcher

val serverSource =
    Http().bind(interface = "localhost", port = 8080) …
Run Code Online (Sandbox Code Playgroud)

scala sbt akka sbt-assembly akka-http

3
推荐指数
1
解决办法
4351
查看次数

标签 统计

akka ×1

akka-http ×1

sbt ×1

sbt-assembly ×1

scala ×1