Skip to content Skip to sidebar Skip to footer

Alternatives To Java On Android

I just got myself an android phone and I'm dying to start coding on it ! However I'm not a big java fan, although I can live with that, I would like to know if there're reasonable

Solution 1:

There's the NDK which allows you to write parts of your program in C or C++.

There's ASE that allows you to write scripts in python and maybe other languages. There's no python compiler despite you might hear otherwise.

I have read something about scala but since I wasn't really interested I did not pay attention.

Solution 2:

There's definitely quite a few people doing Android development in Scala. Of particular notice, there's even a plugin for SBT, the prefered builder for Scala projects, with Android-specific targets.

As for learning curve, I can't speak for Android development itself, as I haven't done that. As for Scala, you can be productive very quick, but learning all the particularities of the language takes time. You don't need to learn all the particularities -- I have seen people write non-toy programs with barely any experience -- but some people can't stand not knowing something about the language they are using.

Also, a lot of Scala code out there is very declarative. If you look at the SBT build files, for example, they are mostly declarative. Some people get very upset by that, for some reason.

I'm guessing what I'm trying to say is that it depends mostly on you how well you'll take to Scala.

As for speed, Scala code can be as fast as Java code, though that may call for avoiding the more high level abstractions in exchange for uglier, but fast, code. It depends a lot of what kind of computation you are doing, though.

Solution 3:

Android 2.2 adds jit to the VM which is supposed to make loading Clojure programs much more efficient. Clojure produces a lot of small classes which take a while to load when the android program starts up. this should be alleviated with the enw android though its not intolerable now.

Solution 4:

Just noticed that some Scala examples can be found in trunk: http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/docs/android-examples.

I haven't tried myself but it's encouraging.

Solution 5:

There's a port of JRuby to Android, as well, which I've played with and seems interesting. http://ruboto.org/

Post a Comment for "Alternatives To Java On Android"