Running Akka 2.0 On Android (WIP)
Posted by gamlerhart in akka-mobile, software-development on January 31, 2012
This information here is allready quite outdated. With the current Akka 2.0 master snapshot some issues are gone, while new pitfalls introduced. I will update / create a new post when Akka 2.0 is close to the final release.
Akka 2.0 is available as a preview version. Here’s a short guide how to get it to run on Android. This pretty much work in progress. Maybe someone else has even has a better strategy. Let me know if that’s the case=). Also I didn’t do much with Akka 2.0 on Android yet, so maybe there are major issues yet to discover =).
In general I just assume that you have a working Scala build and know how to include new Scala libraries. And I also assume that you are using Proguard to shrink the jar file. I use a build based on this. In case you are having trouble, just ask for help =).
First add the Akka 2.0 M3 jar-file to the project (The M2 bits won’t work). Make sure that it is in your directories of libraries which are compacted by Proguard. Unfortunately you will get tons of warnings by Proguard about classes which couldn’t be found, because they are not part of the Android platform. These are three categories of classes which are not available:
- ‘ akka.util.JMX’: There is no JMX on Android.
- ‘sun.misc.Unsafe’: Well at first sight Android doesn’t have this implementation-detail class. Luckily it actually does have it (at least in newer versions), but it’s only available at runtime. The jars which you compile against do not have this class.
- ‘org.omg.CORBA’-stuff. The Akka library has a UUID implementation which implements some interfaces from CORBA.
So it is time for some Proguard trickery to get rid of warnings.
Bye Bye JMX
Well there is definitely no JMX on Android. So I just excluded the JMX stuff from Akka:
## No JMX for Android-dontwarn akka.util.JMX*
Ignoring ‘sun.misc.Unsafe’ Warnings
The next step is to configure Proguard to ignore the ‘sun.misc.Unsafe’ warnings. It is there on the device (If not, please tell me).
## Unsafe is there at runtime-dontwarn sun.misc.Unsafe-keep class sun.misc.Unsafe{ *;}Fixing the CORBA Stuff
Well, just exclude the ‘com.eaio.uuid’ stuff and you should be fine. At least is looks like it when you are only using the basic functionality. (In Akka 1.2 the UUID class is central, in Akka 2.0 it has been replaced with the path system.):
## UUID helpers are not used-dontwarn com.eaio.uuid.**Remove the FSM Forward Reference
The core Akka library contains a forward reference to its finite state machine (FSM) implementation. In a usual class loader environment this doesn’t matter, since classes are lazily loaded. However Proguard is going to bitch about it. So in case you are not using the FSM library remove that reference with Proguard:
## No Finate State Machines Support needed-dontwarn akka.actor.FSMKeep Important Classes
Also we need to keep some classes which are loaded at runtime. Maybe there are more required for some features, just watch for class loader errors. These are the ones you need for sure:
## Stuff referenced at runtime-keep public class akka.actor.LocalActorRefProvider { public <init>(...);}-keep class akka.event.Logging*-keep class akka.event.Logging$LogExt{ *;}Work Around the Reference Configuration Issue?
I’m not sure what exactly the issue is here and probably I’m doing something wrong. At least with my setup Akka cannot find its internal reference.conf resource file. Looks like resources are only loaded from the *.apk file? Anyway, for now I just copied the reference.conf file from the Akka source code to my project (Or do it with a build task). Then everything runs.
Conclusion
Yes, it is a little hairy to get Akka 2.0 to run on Android. I certainly will work a little more on it. And in case it gets too bad I’ll do a shallow fork of Akka .
리믹스하고 매시업이 만드는 사람 좋아해요: DJs From Mars / Favorite Remixer and Mashupers: DJs From Mars
Posted by gamlerhart in 한국어 배우기 on January 27, 2012
리믹스하고 매시업이 만드는 사람이 너무 많아. 그리고 DJs From Mars는 가장 좋은 리믹스를 만들었어. Soundcloud에서 매달 음악-믹스를 업로드해요. 그 음악-믹스가는 항상 새로운 리믹스하고 매시업이 있오요.
DJs From Mars는 유명한 팝 노래가 하우스 음악를 되는 걸 해요. 그래서 저 하우스 음악아랑 알려진 노래가 매우 재미있어요.
그리고 난 DJs From Mars의 한번 음악-믹스 들어봤을 때 하우스-음악을 진짜 좋아해요.
여기 음악-믹스가 하나 있어요:
There are many remixers and mashup creaters. And so DJs From Mars are one of the best remix makers. On Souncloud they monthly upload a music-mix. That music-mix has always new remixes and mashups.
DJs From Mars turn popular pop songs into house music. That house music with known songs is fun.
And after listening to their mixes I started to really like House music.
There such a music mix above.
Translation of the Comic:
Happy-guy: I like Pop music but don’t like House music.
Evil-guy: I like House Music and Noise. More Noise please.
Happy-guy: Should we make a Remix together?
Evil-guy: Allright.
Together: We are a good team!





