Hacker News new | past | comments | ask | show | jobs | submit login

Sort of. It has issues with ProGuard, but the Scala standard library is a couple of megabytes, so you'll be adding some size to your application, or you'll have to very carefully test and configure.

Additionally, Dalvik didn't have JIT until late in its maturity, so besides the normal slowdown from Java->Scala, expect it to slow down further by the less-efficient VM.

It might be viable on newer devices, but it'll definitely have problems on older ones. Other than that, it does seem very feasible to write and deploy a Scala Android app.




Kotlin might have a better time on Android (though I too would prefer Scala), or at least better support. I haven't tried it yet on Android, but Jetbrains had a small tutorial for it on their blog[1]. I've just been putting it off since it was an immature language, but that may not be quite as true now.

[1] http://blog.jetbrains.com/kotlin/running-hello-kotlin-on-and...


There are pretty much no issues using Scala on Android. After running ProGuard, the Scala library takes up a few dozen kilobytes.

Execution is as fast as Java. I remember running my Scala app on one of the first tablets (Android 2.x) without issues.

The build system support is impressive and there is a whole community which focuses on Scala running on Android.


Have you built a substantial application using Scala on Android? Bump uses Scala, and they had to do a lot of messing with build processes, and they ended up using Java for performance in places as well. I can't find the talk right now, but here's the slides: http://www.slideshare.net/michael.galpin/scala-on-android-ex...


Facebook didn't use Scala and they managed do hit a lot of same issues, too, like this one: http://code.google.com/p/android/issues/detail?id=22586

Anyway, the presentation is almost two years old now.


Admittedly, my experience on this was running it on now-ancient Android devices before Dalvik had JIT, and ProGuard at the time seemed to always render Scala apps un-runnable, for whatever reason. At least for me at the time, it was questionable. Nowadays, given the amount of work put into it, I'd put some trust in running it in production. But I'd still expect issues to come up now and then, as it's not a natively supported platform.


How difficult is it to tie in native libraries with Scala on Android?


I think it is pretty similar to Java. Java has the native keyword, Scala has the @native annotation.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: