2
在我的項目中,我想使用遠程演員,並已成功嘗試並測試它們作爲Scala-SBT項目。無法啓動活動:找不到關鍵字'akka.version'的配置設置
但是,當我試圖在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(),但它沒有工作
對此請幫助。
並且出現這個新錯誤... 引起:java.lang.NoSuchMethodException: [class akka.actor.ExtendedActorSystem,class akka.remote.RemoteActorRefProvider] –
user2730066