阿卡在Android上多reference.conf [英] Akka on Android multiple reference.conf

查看:354
本文介绍了阿卡在Android上多reference.conf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想补充阿卡,喷到我的Andr​​oid应用程序(用Scala编写与Scaloid LIB)。应当一切正常,我的IDE未抛出任何错误。我发现了一些链接解决同样的问题,但没有任何帮助了我这么远。当我和我的建造项目:

I'm trying to add akka and spray to my android app (written in Scala with Scaloid lib). Everything should work fine, my ide is not throwing any errors. I found some links addressing the same problem, but nothing helped me so far. When I build my project with:

sbt ~android:install

当我有以下线在我的build.sbt

When I have the following line in my build.sbt

apkbuildExcludes in Android += "reference.conf"

我得到的错误

I get the error

08-31 08:02:45.598    7884-7884/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: at.itn.android, PID: 7884
    com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka'

没有它

[info] Generating dex, incremental=true
com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK reference.conf
    File 1: /home/markus/.ivy2/cache/com.typesafe.akka/akka-actor_2.11/jars/akka-actor_2.11-2.3.5.jar
    File 2: /home/markus/.ivy2/cache/com.typesafe.akka/akka-actor_2.11/jars/akka-actor_2.11-2.3.5.jar

我没有任何reference.conf(我也试过的 reference.conf 的的https://github.com/akka/akka/blob/master/akka-actor/src/main/resources/reference.conf

这是我的 build.sbt

android.Plugin.androidBuild

name := "myApp"
scalaVersion := "2.11.0"

proguardCache in Android ++= Seq(
  ProguardCache("org.scaloid") % "org.scaloid"
)

proguardOptions in Android ++= Seq(
  "-dontobfuscate",
  "-dontoptimize",
  "-dontwarn scala.collection.mutable.**",
  "-ignorewarnings",
  "-keep class scala.Dynamic"
)

apkbuildExcludes in Android += "reference.conf"

libraryDependencies ++= {
  Seq(
    "org.scaloid" %% "scaloid" % scaloidV,
    "com.typesafe.akka" % "akka-actor_2.11" % akkaV
    // ....
  )
}

有人可以给我在正确的方向上我怎样才能在Android阿卡运行?

Can someone send me in the right direction on how I can get akka running on android?

推荐答案

我用阿卡的工作示例和喷雾机器人。一探究竟。 https://github.com/anjeikatkov/android-akka-spray-example

I have a working example of using akka and spray on android. Check it out. https://github.com/anjeikatkov/android-akka-spray-example

希望,它帮助。

这篇关于阿卡在Android上多reference.conf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆