

Ask HN: What is the best language for learning to build an Android app? - ctrx

I want to get in the app business, for androids but have no idea on which coding language to learn. What is the best one to use&#x2F;easiest?
======
elaineo
Another vote for Java, because when learning to build an Android app, you'll
be searching for answers on stackoverflow every 15 minutes, and it's easier to
use the language everyone else is using.

------
EdwardDiego
I'll also say Java - Scala's possible, but slow and fiddly (last time I tried
it, you had to tree-shake the app using Proguard because the Scala stdlib has
a real hard time fitting into Dalvik's hardcoded limitations of 65K ish
symbols).

Kotlin is a doddle to get working, but it's alpha as hell, so only use for
experiments.

------
kylemaxwell
Those are very different questions. Do you already know a language? Is it Java
(the closest thing to "native" Android seems to have)? If not, is it Java-
like, or is the toolchain available for Android (e.g. Python)?

I don't think there's an easy, one-size-fits-all answer to this question.

~~~
ctrx
Don't know any languages, was learning html5 a bit but i just wanted to know
which would be the best option for an android app

------
primitivesuave
You could go down the path most traveled and learn Java - this is preferred,
because the Android developer site has all its documentation in Java. However,
if you're averse to Java, you can also use C# (xamarin.com)

------
DarkStar851
Java or C# / Xamarin if you don't mind a small investment. Personally I prefer
C# / Xamarin. If you're a student, contact their pre-sales, they'll give you a
nice discount.

------
kintamanimatt
Learn Java 6 (not 7!) and optionally C++/C if you're going to be doing
something computationally expensive that you wouldn't want to run in the
Dalvik VM.

------
krapp
Can someone suggest a good online course or set of tutorials for learning to
build Android apps?

~~~
Zigurd
I would use Google's online tutorial, with one caveat: The section on the use
of Fragment for scale-able UI assumes you want to use the Support Library for
back-compatibility. This creates some complications and it is perfectly valid
to choose not to support Android 2.3 at this point.

The Support Library has two purposes: To provide back compatibility for
classes like Fragment that are not supported in Android 2.3 and earlier, and
to provide new classes that are not part of any Android release yet.

Especially for a beginner, you will have an easier time with Action Bar and
Fragment if you are not using the Support Library.

------
Zigurd
While some other JVM languages are usable at an experimental level with
Android, the only realistic choice for a complete beginner is Java.

Since you say you don't know any language yet, you should start with a very
basic book on Java, like Head First Java. Then you should get a more-
comprehensive book like Thinking In Java to refer to as you start your first
project.

While there are some good Android-specific beginner's books, I would start
with the online tutorial and see how far that takes you. By that time the 2nd
edition of Learning Android will be out.

