【发布时间】:2015-02-21 00:04:05
【问题描述】:
在我的项目中,我想使用远程演员,并成功地尝试和测试了它们作为 Scala-SBT 项目。
但是,当我尝试在 Android 中做同样的事情时。出现以下错误
com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.version'
这是加载配置并用于 Scala-SBT 项目的代码
val hostname="192.168.137.230"
val custom=ConfigFactory.parseString(
"akka {\n " +
"actor {\n " +
"provider = \"akka.remote.RemoteActorRefProvider\"\n }\n " +
"remote {\n " +
"enabled-transports = [\"akka.remote.netty.tcp\"]\n " +
"netty.tcp {\n " +
"hostname = \""+hostname+"\"\n " +
"port = 2551\n }\n }\n }"
)
val system = ActorSystem("RemoteSystem",ConfigFactory.load(custom))
对我来说似乎很明显的问题是 akka.remote 的 reference.conf 没有被使用。
PS:我确实尝试将 akka.remote 的 reference.conf 的内容复制到 ConfigFactory.parseString() 但它不起作用
请帮助解决这个问题。
【问题讨论】:
标签: android scala akka akka-remote-actor