我正在尝试在Eclipse中创建一个新的Akka项目。我遵循了的步骤
但是我收到关于找不到Akka依赖项的错误。
会很感谢你的帮助。这是输出。
C:\Users\*\workspace\akka-project-in-scala>sbt
[info] Loading global plugins from C:\Users\*\.sbt\plugins
[info] Loading project definition from C:\Users\*\workspace\akka-project-in-scala\project
[info] Set current project to
我想在Scala2.11.xAkka2.3.x中使用spray.io,并在spray.io的Project页面中找到以下内容:
spray 1.3.1 is built against Scala 2.10.3 and Akka 2.3.0 as well as Scala 2.11.1 and Akka 2.3.2.
当我使用喷雾客户机时,我遇到了一些问题,然后在spray.io的文档页面中发现,喷雾客户端依赖于akka 2.10.x:
akka-actor 2.2.x (with ‘provided’ scope, i.e. you need to pull it in yourself)
我正在组织一个小的SBT项目,并学习如何使用akka演员。我能够得到一个简单的示例,只使用akka,但是一旦我使用外部库,就会停止工作。我得到了一个非常大的堆栈跟踪
objc[15196]: Class JavaLaunchHelper is implemented in both
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java (0x10cc6c4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
我使用SBT来设置Akka持久化,但是它失败了,错误是:
Detected java.lang.NoSuchMethodError error, which MAY be caused by incompatible Akka versions on the classpath. Please note that a given Akka version MUST be the same across all modules of Akka that you are using, e.g. if you use akka-actor [2.5.6 (resolved from curr
我试图在scala中使用zeromq扩展,但是编译在sbt中失败。
import akka.zeromq._
这是我所犯的错误;
object zeromq is not a member of package akka
build.sbt文件看起来像;
name := "Akka Test"
version := "1.0"
scalaVersion := "2.10.2"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesaf
好吧,我的合作者在build.sbt下运行代码,如下所示,没有任何问题,而我得到:
[error] /.../GameMap.scala:91: value revalidate is not a member of javax.swing.JFrame
[error] frame.revalidate()
[error] ^
[error] /.../GameMap.scala:92: value revalidate is not a member of java.awt.Container
[error] frame.getContentPane.re
以下代码:
import org.scalamock.scalatest.MockFactory
import org.scalatest.FlatSpec
trait SomeTrait {
def getLongByInt(int: Int): Long
}
class TestScalaMock extends FlatSpec with MockFactory {
"Scala Mock" should "mock my trait" in {
val someTrait = mock[SomeTrait]
(someTrai
我正在写一个akka应用程序。在创建应用程序的远jar时,我不希望scala库与jar打包在一起。我的build.sbt如下所示:
lazy val root = (project in file(".")).
settings(
name :="akka-app",
version :="1.0",
scalaVersion :="2.10.4",
mainClass in Compile := Some("sample.hello.HelloWorld")
我对Scala和SBT都很陌生,为了学习一些新的东西,我正试着阅读“”一书。书中引用的示例库现在已被更晚的版本所取代,或者在某些情况下似乎被不同的技术所取代(casbah to Mongo驱动程序)。这导致我产生了一些可能不正确的SBT构建文件。在我最初的构建文件中,我有;
name := "BuildingScalaRecommendationEngine"
scalaVersion := "2.12.1"
version :="1.0"
libraryDependencies += "org.apache.spark"
使用下面的代码,我不断得到未解析的依赖项。我能做些什么来清除这个错误吗?
name := "AkkaDemo"
version := "1.0"
scalaVersion := "2.11.8"
val scalaTestVersion = "3.0.1"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
lazy val akkademoService = project