我在android上運行akka時出現問題。我的應用程序崩潰後,我開始它。我使用Akka 2.3.5,Scaloid 3.5-10。Android上的Akka
我開始SignInActivity與
private implicit val system = ActorSystem("signin") // this throws the error above
override def onCreate(savedState: Bundle): Unit = {
super.onCreate(savedState)
setContentView(R.layout.signin)
val etMail = find[EditText](R.id.etMail)
val etPass = find[EditText](R.id.etPass)
find[Button](R.id.signInBtn).setOnClickListener(new OnClickListener {
override def onClick(v: View): Unit = {
signIn(etMail.text.toString, etPass.text.toString)
}
})
09-21 11:35:34.601 10789-10789/at.itn.android E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: at.itn.android, PID: 10789
java.lang.NoSuchMethodError: scala.collection.immutable.HashSet$.empty
at akka.actor.ActorCell$.<init>(ActorCell.scala:336)
at akka.actor.ActorCell$.<clinit>(ActorCell.scala)
at akka.actor.RootActorPath.$div(ActorPath.scala:159)
at akka.actor.LocalActorRefProvider.<init>(ActorRefProvider.scala:464)
at akka.actor.LocalActorRefProvider.<init>(ActorRefProvider.scala:452)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$2.apply(DynamicAccess.scala:78)
at scala.util.Try$.apply(Try.scala:191)
at akka.actor.ReflectiveDynamicAccess.createInstanceFor(DynamicAccess.scala:73)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$3.apply(DynamicAccess.scala:84)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$3.apply(DynamicAccess.scala:84)
at scala.util.Success.flatMap(Try.scala:230)
at akka.actor.ReflectiveDynamicAccess.createInstanceFor(DynamicAccess.scala:84)
at akka.actor.ActorSystemImpl.liftedTree1$1(ActorSystem.scala:584)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:577)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:141)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:108)
at at.itn.android.gui.activities.SignInActivity.<init>(SignInActivity.scala:20)
我真的不看這個定義如何能有任何麻煩的,雖然。也許這是一個proguard.cfg的問題?
java.lang.NoSuchMethodError: scala.collection.immutable.StringLike.toString
有人有一種類似的問題,並與一些正確的ProGuard選擇固定它。我的proguard中有SeqLike Part,但可能還有其他東西丟失。
有沒有人知道我做錯了什麼? PS:我之前做了一個類似的帖子(雖然有其他不同的問題),但是由於我現在無法工作,所以我發佈了另一個AKK問題。
謝謝,可能就是這樣。 – Markus 2014-09-23 10:39:42