Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala, Android and Eclipse

I've started learning Scala, and I... I think I'm in love. I've only coded small test snippets so far, but since I currently working in Android development, what I really want to do is try my hand at writing Android applications in Scala.

I've found articles and questions on the matter, but mostly referring to older versions of the three tools (Android SDK/Scala/Eclipse), so the general question is:

Is anybody coding Android apps in Scala right now, with the latest SDK, Scala 2.9 and Eclipse Indigo? How viable is it?

And, in particular:

  1. How's the interaction/integration between Scala's features and the Android library?

  2. What's the state of the Scala plugin for Eclipse? I've read all the features you'd expect are there, but I'd like to know first-hand stories, specially about the debugger.

  3. How well does the build process (scala to java to dalvik, ant, proguard, etc.) automate?

Thanks!

like image 456
slezica Avatar asked Oct 08 '11 13:10

slezica


People also ask

Does Eclipse run on Android?

Android (despite its Linux roots) is far from capable of running Eclipse IDE as is. Not only is the hardware inadequate for supporting such a large application, but Android lacks a full Java SE JVM (Dalvik is a subset) and SWT (Eclipse UI framework) implementation for native Android UI controls does not exist.

Does Scala work on Eclipse?

Scala IDE. The Scala IDE for Eclipse is centered around seamless integration with the Eclipse Java tools, providing many of the features Eclipse users have come to expect including, Support for mixed ...

Which IDE can be used for Scala?

IntelliJ IDEA While this is technically an IDE for Java, the IDE provides support for lots of other languages like Scala, Groovy, Kotlin, JavaScript, TypeScript and SQL. In addition to the host of features, IntelliJ IDEA offers Scala-specific support in testing with ScalaTest.

How do I add Scala support to Eclipse?

Downloading and installing the Scala IDE for Eclipse First choose a version of the IDE from http://download.scala-ide.org. We recommend you choose 2.0. x, which comes with Scala 2.9. Copy the corresponding URL and then choose Help/Install New Software and paste the URL you just copied.


1 Answers

We are using Scala heavily to test our Android code - you can read a writeup of how we're doing so here. We use Ant or SBT to compile - there's an excellent SBT plugin for Android development.

Having said all of that, I'm not sure that I would recommend Scala for production Android development. In particular Scala 2.9.x is basically unusable as there is no good way to get the libraries to work on Android. You can read about the issue here.

It's a real pity, as Android development would benefit considerably from Scala if we could get it working properly.

like image 99
Paul Butcher Avatar answered Oct 02 '22 15:10

Paul Butcher