To Build an Android App, You Need to Learn These 7 Programming Languages
Android is closing in on a decade since it launched, but that doesn’t mean you’ve missed the boat when it comes to learning how to make Android apps. In fact, there’s no better time to learn than now. Never before has there been so many effective ways to create awesome Android apps.
And since all new Chromebooks from here on out will be able to install and run Android apps , the market for Android apps is growing. Don’t worry about being late — you aren’t. All you need to do is buckle in, take a deep breath, pick the right programming language, and start your journey.
But which programming language is right for you? Nobody can tell you what to use. It comes down to your programming history (or lack thereof) and which languages you feel most comfortable using. Fortunately, you have options. Here are the best languages to use as of this writing.But which programming language is right for you? Nobody can tell you what to use. It comes down to your programming history (or lack thereof) and which languages you feel most comfortable using. Fortunately, you have options. Here are the best languages to use as of this writing.
You cannot go wrong with Java when making Android apps. It’s the official language of the system, it’s the second most active language on GitHub, and it’s been around for more than 20 years. All of this means that tutorials are abundant and you won’t have to worry about the language dying out anytime soon.
Since Java is so widely used across dozens of industries, we recommend starting with these books on Android-specific Java . Obviously the Java language itself is the same regardless, but there are certain paradigms and idioms that will help make better sense of Android app development, and that’s what most of these books aim to cover.
Note that Java, because it’s so old, lacks a lot of the finesse and features of newer languages. If you’re a newbie then this probably won’t affect you, but if you’re coming from a language like Swift, then Java may feel claustrophobic.
Kotlin is a language that was designed to run on the Java Virtual Machine. This means that Kotlin apps are compiled to Java bytecode, allowing Kotlin apps to run on any machine that supports the Java runtime environment — and since most machines can, Kotlin is a relatively easy way to create cross-platform software.
With Kotlin, you get the best parts of Java without any of the downsides. The syntax and features of Kotlin are modern, clean, fast, and provide for a much more comfortable programming experience. Whereas Java feels clunky and outdated, Kotlin feels new and smart. And in some ways, you can even think of Kotlin as a language designed for Android app development.
The downside? Kotlin is very young. It first appeared in 2011 and wasn’t officially released until 2016. The good news is that Kotlin is free and open source so you can expect it to develop quite quickly, but it will be a few years before it really solidifies as a reliable choice.
C# is an incredible language. In my own experience, it’s everything right about Java without any of the bad parts, made even better by all of the improvements on top. It’s like Microsoft saw the potential of Java and decided to make their own better version of it.
For a while, the biggest drawback of C# was that it could only run on Windows systems because it relies on the .NET Framework . But all of that changed when Microsoft open sourced the .NET Framework in 2014 and acquired Xamarin in 2016, the company that maintains Mono (a project that allows C# programs to run on many platforms).
Today, you can use Xamarin.Android and Xamarin.iOS to create native mobile apps with Visual Studio or Xamarin Studio. It’s an excellent path to take because you can use the language in other contexts later on, such as to create complex games with Unity and C# . An example of an app built with Xamarin? MarketWatch.
Note that Xamarin used to cost money but Microsoft made it free!
While Android doesn’t support native Python development, there are tools that let you create apps in Python and then convert them into APKs that successfully run on Android devices. This is a great example of Python as an effective real-world language , and it’s good news for Python fans who want to create apps but can’t stand the trappings of Java.
Kivy is the most popular and robust solution for this. Not only is it open source, and not only does it support Windows, Mac, Linux, and iOS in addition to Android, but it’s also designed in a way that encourages rapid app development. If anything, you can use it as a prototyping tool. You can do so much in so few lines of code.
But since it isn’t natively supported, you won’t get native benefits. Apps made with Kivy tend to result in bigger APKs, slower startups, and suboptimal performance. But every release is better than the last, and devices are so powerful nowadays that this doesn’t matter too much, so don’t let it stop you.
Examples of Android apps made with Kivy include Barly.
To create Android apps this way, you can use Adobe Cordova, which is an open source framework that also supports iOS, Windows 10 Mobile, Blackberry, Firefox, and more. But as useful as it is, Cordova requires a lot of work to get a semi-decent app up and running, which is why many prefer Ionic Framework instead (which uses Cordova to deploy to various platforms).
Another separate option is to use React Native. This library can deploy to Android, iOS, and the Universal Windows Platform. It’s maintained and used by Facebook, Instagram, and other big companies, so you know it’s tried and tested. The learning curve isn’t easy, but once you can get over that initial hump, you’ll have all the power and flexibility you need.
Lua is an old scripting language that was originally designed to supplement programs written in more robust languages like C, VB.NET, etc. As such, it has a number of quirks that make it stand out, such as starting arrays at 1 instead of 0 and not having native classes.
That being said, Lua can be used as a main programming language in certain cases, and Corona SDK is one great example. With Corona, you can create rich apps using Lua that can be deployed on Windows, Mac, Android, iOS, and even Apple TV and Android TV. It also has built-in monetization features plus an extensive marketplace where you can buy assets and plugins.
Google provides two official development kits for making Android apps: the SDK, which uses Java, and the NDK, which uses native languages like C and C++ . Note that you cannot create an entire app using C or C++ and zero Java. Rather, the NDK lets you create a native library whose functions can be called within your app’s Java code.
For the most part, you probably won’t need to use the NDK. You should not use it just because you prefer to code in C/C++ versus Java. Instead, the NDK exists for when you need to wring more performance out of computationally-heavy tasks. It also allows you to incorporate C or C++ libraries into your app.
But otherwise, you should stick to Java whenever possible. Android app development using C/C++ is many times more complex than using Java, and you often don’t gain much more out of it.
What Kind of App Do You Want to Make?
Chat messengers. Games. Calculators. Notebooks. Music players. The possibilities are endless! And all of them are made possible with the above languages and frameworks. You don’t have to learn them all — just learn the ones that you’ll need to get the job done. If you ever need to expand your skills later, you can do that when the time comes.
In addition, we recommend reading these blogs for mobile app development. They’ll help you get into the mindset of what makes a successful mobile app and help you overcome several obstacles you’ll undoubtedly encounter.
If you’re interested in going beyond mobile apps, check out our tutorial for creating your own self-hosted read-it-later app .
So what kind of apps are you planning? Which languages and frameworks look most appealing to you? Got any other tips to share? Let us know in a comment down below!
Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.