Setting up an Android development environment for the first time can be challenging. Knowing where to start, or even finding current and accurate information that can guide you through the process can be hard. There’s more conflicting, out of date, or just plain wrong information on the web than you might believe. Even new books on your local bookstore’s shelf (if you still have a local store that is) or from an online retailer can contain so much inaccurate information it’s surprising.
Understanding a few things first may help you clarify the process, so before beginning the setup process, or even downloading what you believe are the necessary files, answer the following questions and make sure you’ll be on your way to getting the right pieces. N.B. – I’m writing from a Windows perspective, but it should apply to other platforms as well.
1) Will you need a new computer with lots of memory, and will you need a 32bit or 64bit (x64) OS as a development platform?
The good news is that the Android programming doesn’t take much memory or require a powerful computer; any computer made in the last few years should be fine. Remember, your target platform – tablets and phones – probably have far less computing power compared to any recent desktop or laptop.
Short answer on memory; 4GB is fine. Using any version of Windows 7 – Home Premium, Professional, or Ultimate – in 32-bit or 64-bit (x64) is fine. A 32-bit OS limits addressing space to under 4 GB (approximately 3.7 GB), while a 64-bit system allows you to add 8GB, 16GB, or more (depending on your machine of course), but since Android is a 32-bit system, you won’t need it.
2) Which JDK(s) should you install? Should you choose the Java EE (Enterprise Edition), SE (Standard Edition), or even ME, the Mobile Edition, and should it be a 32bit or 64bit?
Which version? – Your computer may already have java installed, but you probably want to download one or two JDKs (Java Developers Kit) if you’re not up to date. Remember, you’ll need the full JDK which includes the JRE (Java Runtime Environment). Don’t just download the JRE alone.
Oracle (Java’s current “owner”) provides a lot of choices, and they can get confusing. It appears that the most frequent choice is the SE version, while some others recommend the EE version for either larger development projects or if they have specific needs. I’ve used both the SE and EE version without issues, but the SE version has a slightly smaller footprint. What you don’t want is the Java ME (Mobile Edition) SDK. Android already provides everything you need for mobile development and won’t use any of the ME code.
32bit or 64-bit? – Android is a 32-bit OS today. There’s no real reason today to use a 64-bit IDE, but you can if you’d like. Just be aware of the potential conflicts between 32-bit and 64-bit software (See Eclipse below).
The most recent Java JDK is 7 u9 (version 7 (really v1.7), update 9). You should download it, but I’m also going to recommend that you get the Java 6 JDK/JRE too, as many of the available Android code samples that you’ll find online were built with the Java 6 compiler vs the Java 7 version. Sure you could always modify each project and update it to Java 7, but it’s much faster to have at least one level back too so projects compile easily.
Java SE (7u7) overview page and download link: Java SE
Java EE (Java EE 6 SDK & JDK 7 U7) overview page and download link: Java EE
3) What Android SDK versions will you need? Should you download just the most current, a specific older version to use with a test device(s) you already have, all versions or what?
There are lots of Android devices out there, some running version 2.x, 3.x, and as of 2012, 4.x devices have been added to the mix. Which mix of SDKs you download is up to you, but regardless of which ones you choose, always get the newest version. At the time I’m writing this API 16 for Android 4.1 (or 4.1.1) Jelly Bean is the most recent version. In short, always get the newest, and get others if you need them.
More on this, the Android ADT, and Eclipse IDE coming up.
4) Which IDE (Integrated Development Environment) will you be using?
There are many free Android development choices including Eclipse (a free and open source IDE), Google/Motorola’s Motodev, Oracle’s Netbeans, and InteliJ, to name a few, but let’s make this easy – you’re better off using Eclipse. Google developed its Android development tools (ADT) plug-in for Eclipse and for the most part, for the most part, everything works as expected.
Eclipse has some added advantages. It’s the most widely used IDE so if you get stuck there’s a good chance other developers might be able to answer questions. N.B. – Don’t ask Android development questions on the Eclipse forums; you probably won’t get the response you’re were expecting. …
Another Eclipse advantage is that it doesn’t install in the traditional sense. There’s no writing to the registry, loading dll’s, putting icons in every folder on your machine and then forcing you log in to their site. It comes in a self-contained zip file. After downloading, just create a folder, unzip the file, and run the .exe file (create a shortcut if desired). Remove it, swap one version for another, or even run different versions concurrently (I wouldn’t make a habit of this).
After choosing your IDE, you’ll still have to choose either a 32-bit or 64-bit version. Google’s site recommends the “Eclipse Classic” version but you’re fine choosing the SE or EE version too. I installed the SE version on one machine and the EE on another. Just make sure that it matches the rest of your environment (see table below).
If you have this Win OS Installed |
Install this JDK |
Install this Eclipse IDE |
32-bit |
32-bit only |
32-bit only |
64-bit (x64) |
32-bit |
32-bit or 64-bit (x64) |
64-bit (x64) |
64-bit (x64) |
64-bit (x64) only |