70

Possible Duplicate:
Which programming languages can I use on Android Dalvik?

Mostly, Android applications are written in Java. But i heard that its also possible to use Scala or some other languages. And I also read that it's possible to include native C/C++ code.

Is there a refernce/list available that shows which languages can be used?

Community
  • 1
  • 1
RoflcoptrException
  • 51,941
  • 35
  • 152
  • 200

7 Answers7

74
  • 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.

Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
53

Here's a list of languages that can be used to develop on android:

  • Java - primary android development language

  • Kotlin, language from JetBrains which received first-party support from Google, announced in Google I/O 2017

  • C++ - NDK for libraries, not apps

  • Python, bash, et. al. - Via the Scripting Environment

  • Corona- One is to use the Corona SDK . Corona is a high level SDK built on the Lua programming language. Lua is much simpler to learn than Java and the SDK takes away a lot of the pain in developing Android app.

  • Cordova - which uses HTML5, JavaScript, CSS, and can be extended with Java

  • Xamarin technology - that uses c# and in which mono is used for that. Here MonoTouch and Mono for Android are cross-platform implementations of the Common Language Infrastructure (CLI) and Common Language Specifications.

As for your second question: android is highly dependent on it's java architecture, I find it unlikely that there will be other primary development languages available any time soon. However, there's no particular reason why someone couldn't implement another language in Java (something like Jython) and use that. However, that surely won't be easier or as performant as just writing the code in Java.

Oddstr13
  • 201
  • 1
  • 7
Seth
  • 45,033
  • 10
  • 85
  • 120
  • 2
    Another info was missing just for the record, if someone do not need hardware access simply they can do quick HTML/CSS/JavaScript apps to save some time for small apps. e.g: http://www.youtube.com/watch?v=dc5xxN-awuE –  Jan 12 '13 at 21:59
  • 8
    "...as performant as Java..." sad to see that this sentence (as correct as it is in this case) exists – Mark Jul 23 '14 at 13:03
  • 2
    @Mark - "as performant as Java code running in the DalvikVM on a device designed to run Java code running in the DalvikVM." ... This comment wasn't intended to endorse Java as a programming language or to make general claims as to the performance or readability of said language. :) – Seth Jul 27 '14 at 18:09
  • 4
    Kotlin from Jetbrains : https://github.com/JetBrains/kotlin – Zasz Dec 31 '15 at 03:47
  • You forgot Chrome Progressive Web Apps https://developers.google.com/web/progressive-web-apps/desktop – Zibri Nov 04 '18 at 11:43
9

Scala is supported. See example.

Support for other languages is problematic:

7) Something like the dx tool can be forced into the phone, so that Java code could in principle continue to generate bytecodes, yet have them be translated into a VM-runnable form. But, at present, Java code cannot be generated on the fly. This means Dalvik cannot run dynamic languages (JRuby, Jython, Groovy). Yet. (Perhaps the dex format needs a detuned variant which can be easily generated from bytecodes.)

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
amra
  • 16,125
  • 7
  • 50
  • 47
4

As stated above, many languages are available for developing in Android. Java, C, Scala, C++, several scripting languages etc. Thanks to Mono you are also able to develop using C# and the .Net framework. Here you have some speedcomparisions: http://www.youtube.com/watch?v=It8xPqkKxis

BenMorel
  • 34,448
  • 50
  • 182
  • 322
inquam
  • 12,664
  • 15
  • 61
  • 101
3

Clojure can be used, but it's slow.

See also: Clojure fork for Android, and a tutorial.

jqno
  • 15,133
  • 7
  • 57
  • 84
3

I made good experiences with Scala.

I use the simple build tool (sbt: http://code.google.com/p/simple-build-tool/) with the Android-Plugin (http://github.com/jberkel/android-plugin)

nuriaion
  • 2,621
  • 2
  • 23
  • 18
1

Java and C:

  • C used for low level functionalities and device connectivities
  • Java used for Framework and Application Level

You may find more information in Android developers site.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
mhshams
  • 16,384
  • 17
  • 55
  • 65