Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Android development with non-Java languages

How plausible is it to develop for Android using a language that isn't Java? I'd prefer Scala or Clojure. Will any JVM language do?

2 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

I wrote a little bit about this in one of my blog posts. Here's the relevant section:


WHAT LANGUAGES CAN I USE TO WRITE APPS FOR ANDROID?

Android apps are typically written in a programming language called Java. Java is immensely popular, and as an object-oriented language, it’s easy to pick up if you’ve worked with other object-oriented languages like C#, Objective-C, or Ruby.

Google also provides a Native Development Kit (NDK) that allows developers to write important parts of their apps with native languages like C or C++. This can be helpful if you need to reuse existing code or libraries in those languages, or if you want to try to get as best performance as possible for your app.

There are some tools that allow you to write apps using web languages like HTML, CSS, and JavaScript. You can either write apps that run inside something called a WebView, meaning that it’s a full-fledged web page that runs inside an app instead of a browser, or you can use tools like PhoneGap or Appcelerator Titanium to write code that compiles down to native code behind the scenes. There are pros and cons to taking this approach. In general you will get the best results by using a native language like Java, but you can certainly make solid apps that can delight your users with whatever tool you choose.

If you really love another programming language, you can use some 3rd party tools to write apps in that language, though these will always lag behind the latest features that get rolled out with each Android update:

...

If you’re turned off by Java as a programming language, just know that Java for Android is much different than the Java of yore for big, complex, enterprise systems or even programming classes in high school or college. Having written apps for Android, iOS, and the web, it’s not the language that matters as much as the tools and resources for it. Don’t let the language get in the way, and learning another language will only help you become a better programmer (unless it’s LISP).