Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala actors on android

Tags:

android

scala

I tried using actors in a small scala (2.8) app on android (2.1) today and I keep getting a really weird error referencing sun.misc.Unsafe.throwException.

I'm thinking that maybe the dalvik VM doesn't include this so Actors basically can't be used on android but I hope I'm wrong.

Did anyone manage to get actors working on android?

like image 514
alun Avatar asked Jun 25 '10 07:06

alun


2 Answers

Yes, as a matter of fact, they work for me on either Android 2.1 or 2.2.

It is only simple use to do some extremely simple processing after an UI event occurs (setting coordinates on a PicturePanel), but Actors did work without problems so far.

The way I build & deploy the application is SBT with android-plugin 0.4.2 by jberkel, the versions of Scala used has included all versions from 2.8.0RC3 to RC6.

like image 187
Radtoo Avatar answered Oct 11 '22 11:10

Radtoo


I could make actors work using scala 2.9.1. I have used scala-android-libs to install scala in my device.

You can also check this blogpost by jgoday.

like image 39
Macarse Avatar answered Oct 11 '22 13:10

Macarse