Which programming languages can I use on Android Dalvik?

Question:

In theory, Dalvik executes any virtual machine byte code, created for example with the compilers of

  • AspectJ
  • ColdFusion
  • Clojure
  • Groovy
  • JavaFX Script
  • JRuby
  • Jython
  • Rhino
  • Scala

Are there already working versions of bytecode compilers for Dalvik available for other languages than Java?

Asked By: mjn

||

Answers:

I haven’t played with it but I know that Scala works.

http://www.scala-lang.org/node/160

Answered By: mhmhmhmh

Scala works very well.

I’m programming my Android application projects in Scala (Website written in Chinese with some screenshot, source code @ GitHub), and it is pretty easy to setup the evnviroment (without IDE, using SBT as build tool).

It could access every API in Android SDK, so anything you could do in Java, you could do it in Scala too.

You may check this blog entry to see how to build Android application with Scala and SBT.

Answered By: Brian Hsu

The dynamically typed languages wont be possible until Dalvik supports JIT (Just In Time) compiling. I believe there is JIT support in one of the experimental Eclair branches, but it is not yet officially available/supported in Android.

Answered By: Jeff Gilfelt
  • At launch, Java was the only officially supported programming language for building distributable third-party Android software.

  • Android Native Development Kit (Android NDK) which will allow developers to build Android software components with C and C++.

  • In addition to delivering support for native code, Google is also extending Android to support popular dynamic scripting languages. Earlier this month, Google launched the Android Scripting Environment (ASE) which allows third-party developers to build simple Android applications with perl, JRuby, Python, LUA and BeanShell. For having idea and usage of ASE, refer this Example link.

  • Scala is also supported. For having examples of Scala, refer these Example link-1 , Example link-2 , Example link-3 .

  • Just now i have referred one Article Here in which i found some useful information as follows:

    1. programming language is Java but bridges from other languages exist (C# .net - Mono, etc).
    2. can run script languages like LUA, Perl, Python, BeanShell, etc.
  • I have read 2nd article at Google Releases ‘Simple’ Android Programming Language . For example of this, refer this .

  • Just now (2 Aug 2010) i have read an article which describes regarding “Frink Programming language and Calculating Tool for Android“, refer this links Link-1 , Link-2

  • On 4-Aug-2010, i have found Regarding RenderScript. Basically, It is said to be a C-like language for high performance graphics programming, which helps you easily write efficient Visual effects and animations in your Android Applications. Its not released yet as it isn’t finished.

Answered By: Paresh Mayani

Mercury also works on Android, using its Java backend. I’ve written a simple app that should help someone get started (there are still few other examples), and mercury-android-helper also for this purpose (although at this exact moment, it’s short a few commits. And neither are using ProGuard yet, so the .apk size is shocking.)

Although the other posts here are cheerful about Scala-on-Android, posters in Scala forums are more concerned by Scala’s ability to blow through some of Dalvik’s limitations, and people who do use it say they reserve it for non-production code. (Some discussion about Scala’s problems here.)

I can’t say yet if Mercury has its own problems with Dalvik, but I’ve switched to it from Scala for the time being.

Answered By: Julian Fondren

Kawa is a lovely but little known variant of Scheme that has existed quietly for many years and runs on both the JVM and Dalvik, natively. Therefore, its output includes no extra VM and only includes explicitly imported libraries. To the end-programmer, this means Kawa’s performance and executable size are nearly identical to standard Java (ProGuard not required).

Kawa also includes lots of macros (including some specific to Android APIs) that make for a nice clean syntax (assuming one is not averse to parentheses), and adds some tasty goodies on top of Scheme, like “promises” (lazy eval and futures in one). The language is quite robust and well-documented, and has been actively maintained and evolving since the early days of Java.

The Java Advent Calendar summarizes Kawa’s merits with some informative examples and links.

Answered By: bug

Another JVM language that works on Android is Kotlin with Anko, both from Jetbrains.

Answered By: Thomas

1) Angular + nativeScript

2) Reactnative

Answered By: Ion Vladescu
Categories: questions Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.