what languages do i need to learn to develop android apps ?
Even if you don’t think we are fully in a post-PC era, it is clear that mobile platforms play a vital role in many aspects of our lives. Whether for fun or for profit, developing Android apps can be rewarding, both personally and financially. Assuming you have a certain level of technical knowledge, it is possible to develop Android apps on your own, but which programming languages do you need to learn?
The official language for Android development is Java. Large parts of Android are written in Java, and its APIs are designed to be called primarily from Java. It’s possible to develop C and C ++ apps using the Android Native Development Kit (NDK), but it’s not something Google promotes. According to Google, “The NDK will not benefit most applications. As a developer, you need to balance its pros and cons. Notably, using native code on Android doesn’t usually result in a noticeable performance improvement, but it still increases the complexity of your app.
The job of these virtual machines is to interpret the bytecode.
Java is a programming language first released by Sun Microsystems in 1995. It can be found on many different types of devices, from smartphones to mainframes. You can use it on your desktop PC and even on the Raspberry Pi. Java does not compile into native processor code, but rather relies on a “virtual machine” which includes an intermediate format called Java bytecode. Every platform that runs Java needs a virtual machine (VM) implementation. On Android, the original virtual machine is called Dalvik. Google has also started previewing its next generation VM called ART. The job of these virtual machines is to interpret the bytecode, which is really just a set of instructions similar to machine code found in CPUs, and run the program on the processor. Virtual machines use a variety of technologies including just-in-time compilation (JIT) and early compilation (AOT) to speed up processes.
All of this means that you can develop Android apps on Windows, Linux, or OS X and the Java compiler converts the source code to bytecode. This in turn is performed on the VM built into Android. This is different from the model used by iOS which uses a native compiler to transform Objective-C into ARM machine code.
is another official language of Android. It’s similar to Java in many ways, but it’s a bit easier to understand. It’s also now Google’s preferred language, although it isn’t as widely used outside of Android Studio. This can make it a little less appealing to those hoping to work as developers on a lot of projects.
Kotlin has been an official language for Android development for quite some time now, and Google has even gone so far as to make it the preferred option for Android development. That said, with many development teams already deeply invested in Java, many have chosen not to make the switch.
Like Java, Kotlin runs on the Java Virtual Machine. It is also completely interoperable with Java and does not cause any slowdown or increase in file size. The difference is that Kotlin requires less “boilerplate” code, which means it’s a more streamlined and easier to read system. It also removes errors like null point exceptions and even frees you from ending each line with semicolons. In short, it’s great if you are learning to develop Android apps for the first time.
So, Kotlin is definitely an easier starting point for newbies, and the fact that you can still use Android Studio is a big plus. Having said that, it is still a complex language in its own right, and you will still need to come up with a lot of extra “tricks” to create an Android app this way. There’s also the slight downside of Kotlin being less widely used outside of Android development.
It’s fair to say that most of the people reading this shouldn’t go this route when developing Android apps. Android Studio supports C / C ++ code using Android NDK (Native Development Kit). This means that you will be writing code that does not run on the JVM, but instead runs natively on the device and gives you more control over things like memory allocation. For intensive applications like 3D games, it can let you get extra performance from Android device. It also means that you will be able to use libraries written in C or C ++.
However, it also tends to be much more difficult to configure, it introduces more bugs, and it is less flexible. And if you wanted to make a computer game, you’d probably be better off using a plug-and-play game engine like Unity.
is a more beginner-friendly alternative to C or C ++ that further scrambles the code. It’s also a little less difficult than Java, although the two languages are extremely similar. It’s supported by handy tools like Unity and Xamarin, which are great for game development and cross-platform development. C # with Unity is the best option for many mobile game developers.
C # was developed by Microsoft for the purpose of combining the power of C ++ with the ease of Visual Basic. It reads a lot like Java, and if you are familiar with one of these languages it will be relatively easy to switch to the other. Like Java, C # is a garbage collector, which means you don’t have to worry about things like memory leaks and freeing memory yourself. At the same time, C # is more modern than Java with a cleaner syntax – although that might just be my own bias. The best language for developing Android apps often comes down to taste!
If you want a particularly easy and welcoming introduction to Android app development, I recommend the combination of C # and Unity. Unity is a game engine (meaning it provides things like physical calculations and 3D graphics rendering) and IDE (like Android Studio). This is a free tool that makes creating your own games incredibly easy – with just a few lines of code you can set up a basic platform game in under an hour. No exaggeration! And it’s also perfectly powerful, being the tool used by most game studios on the Google Play Store. As a cross-platform solution, Unity will also allow you to port your games to other operating systems such as iOS and Windows. You can even create console games! On top of all that, developing in this way provides a very convenient way to learn object-oriented coding (because objects in this case are actually objects most of the time!). For those hoping to start a career in game development, learning Unity is a great first step.
Another cross-platform tool based on LUA. It massively simplifies the process of building apps while allowing you to call native libraries.
Corona offers another considerably simpler option for developing Android apps, while still giving you a fair amount of power and control. You are going to code in LUA which is already much simpler than Java. And the Corona SDK (Software Development Kit) will make things even easier. It supports all native libraries and allows you to publish on multiple platforms. It is widely used for making games, but can be used in various other ways as well. You will need to use a text editor like Notepad ++ to enter your code and you will be able to run this code on an emulator without even needing to compile first. When you’re ready to create an APK and deploy it, you can do so using an online tool.
It requires basic coding skills, but it provides a nice and smooth introduction to the world of code. At the same time, however, it is definitely limited in what it can accomplish and is only steps away from entering “app builder” territory. It’s more useful for someone who wants to create something relatively simple and isn’t as concerned with developing their coding skills or becoming a pro. If you want to use features like in-app purchases, you will need to pay a fee. The same goes for using native Android APIs.