Wednesday, April 30, 2014

Getting Started with Android Development in 2015 - Windows Version


Getting started as an Android developer can be a bit confusing. Unlike developing for iOS or Windows Phone, Android developers have lots of choices. We can choose our development o/s: Windows, Mac, or Linux. We can choose our IDE: Eclipse, Intellij, or the new Android Studio. We can even choose our device emulators: stick with Android emulator, build one with VirtualBox, or one from Genymotion. Yes, we have a lot of choices and it can be confusing.


So I am going to show you how I set up my PC development environment. I like it because it gives me the best combination of speed and tools to make developing good code easier. Luckily it only consists of three pieces and all of them are free.

Piece Number One: Java SE Development Kit 7u76

There is a bit of confusion in the Android world over which version of Java SE Development Kit we should be using. Java is rarely mentioned on developer.android.com. When it is mentioned it is either Java SDK version 6 or 7. Now if you know anything about Java, you know that version 8 is the most recent one, so why are we using a version which is not the latest? Most likely it is related to the ongoing litigation between Google and Oracle combined with the fact that Google has its own version of the Java Virtual Machine. 

There are quite a few devs which say they are using Android with Java version 8. but I see no reason to switch from version 7. I know that it works and that Google says to use it. So until I hear something definitive from Google, I am sticking with it. Luckily it is still available. Don't fret over the security warnings. The warnings are mainly for servers apps built with Java not for Android apps. Use the link below to get the download. You have to be a registered member of Oracle website, but it is free, save a few emails you will get from Oracle.


Once you have installed it. You must add it to your path's variable and you should also create a Java_Home variable. You should do this before you continue, but don't worry it is easy.

Piece Number Two: Android Studio

Android Studio is now the Android's only official IDE. While you can still use Eclipse, support for it is waning so you shouldn't begin learning Android by using it. Besides Android Studio has lots of nice features which make development more pleasant using it. Now there are somethings that don't work with it yet, but the only big thing is the NDK. I don't have any idea when Google is planning to add NDK support to Android Studio. It is super easy to install just go to the link below and follow the instructions.



Piece Number Three: Genymotion Emulator

Genymotion is built on top of Oracle's VirtualBox. Unlike Google's emulators it doesn't try to simulate an ARM processor instead, it uses the full power of your desktop's CPU to run x86 code. The difference is amazing. On a decent PC, Genymotion is fast enough to run games. 


Genymotion is free for personal use, but you do have to register. Go to: 


To register. They will send a link to your email address in order to confirm it. Click the link and you are in. For Windows machines there is a special installation package which combines VirtualBox and Genymotion together. It is the first one listed under Windows. Be sure to choose it. Follow the installation instructions and once complete, you will need to download a few emulated devices. 

So that's it, nice and simple instructions to get you Android development environment up and running on your Windows PC.