FYI, if someone bumps into

java.lang.ExceptionInInitializerError
...
Caused by: com.typesafe.config.ConfigException$Missing: No configuration 
setting found for key 'akka'

 
Here’s how I solved it:

1) If not yet, you need to subclass the Application class with your own 
implementation. See here: 
http://www.devahead.com/blog/2011/06/extending-the-android-application-class-and-dealing-with-singleton/.
 
I’ll call the new class MyApplication. 

2) InMyApplication, addval config = ConfigFactory.load(). This will use the 
correct class loader. 

3) When creating the the actor system, supply this config and application’s 
class loader by hand (the code assumes you are inside an Activity): 
val app = getApplication.asInstanceOf[MyApplication] 
val actorSystem = ActorSystem("MyActorSystem", app.config, 
app.getClassLoader)

N

On Sunday, December 15, 2013 11:28:56 PM UTC, Nick Stanchenko wrote:
>
> Hi,
>
> Since I spent almost an entire day adding Proguard rules for the latest 
> Akka, I thought I would share them.
> There is a pull request to add this to the cookbook: 
> https://github.com/fxthomas/android-plugin/pull/6
>
> proguardOptions ++= Seq(
>   "-keep class akka.actor.LightArrayRevolverScheduler { *; }",
>   "-keep class akka.actor.LocalActorRefProvider { *; }",
>   "-keep class akka.actor.CreatorFunctionConsumer { *; }",
>   "-keep class akka.actor.TypedCreatorFunctionConsumer { *; }",
>   "-keep class akka.dispatch.BoundedDequeBasedMessageQueueSemantics { *; }",
>   "-keep class akka.dispatch.UnboundedMessageQueueSemantics { *; }",
>   "-keep class akka.dispatch.UnboundedDequeBasedMessageQueueSemantics { *; }",
>   "-keep class akka.dispatch.DequeBasedMessageQueueSemantics { *; }",
>   "-keep class akka.actor.LocalActorRefProvider$Guardian { *; }",
>   "-keep class akka.actor.LocalActorRefProvider$SystemGuardian { *; }",
>   "-keep class akka.dispatch.UnboundedMailbox { *; }",
>   "-keep class akka.actor.DefaultSupervisorStrategy { *; }",
>   "-keep class akka.event.slf4j.Slf4jLogger { *; }",
>   "-keep class akka.event.Logging$LogExt { *; }")
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"scala-on-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to scala-on-android+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to