28

After doing the whole "enterprise" programming for a while, I'm seriously disillusioned by the language itself and always feel quite hampered if I have to go back to it. The project size of your average Android app isn't too intimidating and the libraries are actually quite nice regarding their coding style, but if I could avoid Java, I'd certainly do.

So that's the question: Can I avoid it? While there are lots of JVM language that would be an option on desktops and servers, the Dalvik VM and the devices themselves pose some limits. This seems to be a bit better in 2.2 with the JIT, but limiting myself to the cutting edge would be a rather harsh decision.

The only alternative I know that's used somewhat seems to be Scala. Is there some possibility I'm missing? Clojure seems to run in exactly the problems I've illustrated above with Dalvik, but as the AppInventor is built on Kawa there might be hope for a Lisp on the mobile platform?

What other languages are already usable or make strides towards that?

dbyrne
  • 59,111
  • 13
  • 86
  • 103
mhd
  • 1,339
  • 1
  • 13
  • 14
  • 2
    possible duplicate of [Can I program for android using any JVM language?](http://stackoverflow.com/questions/3002566/can-i-program-for-android-using-any-jvm-language) – Ken Bloom Jul 13 '10 at 23:48
  • 1
    That and other discussions mentioned lots of potential candidates. And it's really not that hard to get any JVM language to run somewhat on Android, practicability and performance are other issues… – mhd Jul 14 '10 at 03:30
  • Concerning about Oracle's charges against Android, can it be a real future possibility from the viewpoint of Google to drop Java and mark some other language as the main supported one? (Maybe I should put a real question regarding this, not just comment.) – pcjuzer Jun 20 '11 at 11:09

7 Answers7

13

Personally, I'd say Scala is your best bet right now. It works really well, with the one drawback being that you are required to include Scala as a dependency (which will increase the size of your application).

Community
  • 1
  • 1
dbyrne
  • 59,111
  • 13
  • 86
  • 103
9

Have you looked at Mirah? It gives you a Ruby-like syntax and compiles to Java. It’s been labeled the CoffeeScript of Java.

Till Ulen
  • 1,759
  • 1
  • 17
  • 17
apg
  • 2,611
  • 1
  • 18
  • 19
  • 1
    Mirah is ideal since it adds more modern features like type inference and closures but adds zero runtime overhead. Take a look at Pindah: https://github.com/mirah/pindah a little tool for helping with the building of Mirah Android apps. Dr. Dobbs has a good overview of the language: http://drdobbs.com/java/229400307 –  Mar 28 '11 at 17:27
  • @technomancy, Right, but how do you get IDE support for this? – Pacerier Nov 20 '14 at 10:30
0

Xamarin Studio let's you build in C#/Mono and build apps for both Android and iOS. Now the presentation layers have to be implemented differently on both platforms, but for the ability to use C#, it's a big Win.

vikram
  • 11
0

DroidScript is probably one of the easiest of the above mentioned development tools to use for Android development. Like Cordova you use JavaScript, but unlike Cordova you have the choice of using native Android GUI's or HTML5 to build your App interfaces.

Also you still have access to all the devices sensors/hardware without needing to import loads of complicated plugins. Plus you get the bonus of being able to develop actually on your mobile device if you need to (you can even build APK's and publish them from your device).

I would say its very good for beginners or prototyping but perhaps not flexible enough for seasoned developers.

David
  • 452
  • 5
  • 8
0

This link has some details on how to get scala apps working on android. I'm sure you can do something similar for clojure or other jvm languages.

Ruboto is aiming to bring JRuby in.

Elfred
  • 3,851
  • 22
  • 16
0

I have never used it, but Kotlin is a new language that runs on the JVM developed by JetBrains (the maker of Android Studio) that deserves a mention. The Kotlin website claims the language is 100% interoperable with Java and has a tutorial for Getting started with Android and Kotlin and Android Studio now actually comes with Kotlin support.

qwr
  • 9,525
  • 5
  • 58
  • 102
  • Jetbrains is not the maker of Android Studio. Google is. Android Studio is just built on top of intellij platform by Jetbrains. – Zaffy Jun 27 '19 at 11:32
-1

You can build an android app with the knowledge of just Html/css/Js. So there is no need of Java to create an android applications. Visit here for some basic knowledge. [1]http://www.chromeearth.com/requirements-cordova-platform/

Bipin Paudel
  • 85
  • 1
  • 8