Skip to content

Prepare your system to run Android

September 16, 2011
Android Installation

So you’re ready to start building Android Applications. What do you need on your computer you ask? It’s not as complicated as you thing. Since I’m on a MAC, the instructions below focus on how to install Eclipse and the Androids SDK for the MAC OS. Windows isn’t too much different and although this will come across as biased, I actually believe that if you are going to be developing mobile applications, having a MAC is to your advantage because it would allow you to program for BOTH platforms, Apple’s iPhone and Google’s Android.

Mac & Window Users:

  • You need Java installed and running on the Machine. (Mac’s come with this pre-installed.)
  • A Graphical User Interface (GUI) called Eclipse. Free and easy to download
  • The android SDK which is the most time consuming.

The whole process from start to finish will take about 1 hour. The real time kill is downloading the Android SDK and running updates. Downloading the complete framework takes about 30-40 minutes so watch some TV or play Angry Birds but this time, trying to get 3-stars on each level.

If You Need Java:

First, MAC’s already have this pre-installed but if you’re curious to see what version of Java you have, here’s how you do it. Launch your Terminal application. This can be found if you open your Hard Drive, go into your Applications folder and and then go into the Utilities folder. Inside the Utilities folder you will see the Terminal application.

Another quick way of getting there is under the Mac menu bar. Make sure you are not in any programs, meaning you need to be in your “Desktop/Finder View”. Your MAC’s nav should have a “Go” menu. Click on it and there will be a “Go to Folder”. When the screen asks what folder you want to open, enter “/Applications/Utilities”

Now you can drop in the follow line of text into the terminal window: java -version

You should get something similar to this:

Using Terminal to find your version of Java

While in the Terminal, for MACs, type "java -version" to see what version you have

If you have 1.6.0_(another number) this is fine. Basically you have Java and no need to worry. If you absolutely have to have the most recent version of Java, you can go here: http://www.oracle.com/technetwork/java/javase/downloads/index.html

At the time of writing, JDK 7 has just come out. For Android development, you can install JAVA SE which stands for Java (Standard Edition) If you really want to go crazy you can go the rout of JAVA EE (Enterprise Edition) but that it just overkill at this point. Remember your building for a mobile app. The Enterprise Edition of Java is like buying a Mobile Home with everything in it! Including the kitchen sink. If you’re a hard core developer and you must have everything then enjoy, go for it. For the rest of us, stick with JAVA SE. You’ll have more than enough to figure out.

Getting and Installing Eclipse

You must have Java installed and on the machine before you install Eclipse. Eclipse has gone through some rapid updates itself due to Android becoming so popular. Here is a list of the last three releases, in order from oldest to newest:

  • Old: Galileo (Version 3.5)
  • Newer: Helios (Version 3.6)
  • Current: Indigo (Version 3.7)

What’s nice about the download site http://www.eclipse.org/downloads/ is that it should automatically detect your machine and give you the proper list of files to download. When I first went here, it can be very confusing. There are a ton on version you can download but the one that works best and is recommend is Eclipse IDE for Java Developers.

EclipseDownload

Eclipse download URL: http://www.eclipse.org/downloads/ will auto-detect your operating system

Again you can go with the EE (Enterprise) version but it’s overkill. The regular version of Eclipse is filled with tons of options and I still don’t know what everything does, meaning, it is NOT short on functionality and features.

To determine if you need to download the 64-bit or 32 bit version . . . check your MAC’s system by going:
About This Mac -> More Info -> Software
64-bit Kernel and Extensions: No (Use 32-bit)
64-bit Kernel and Extensions: Yes (Use 64-bit)

MaBits

64-bit Kernel and Extensions will be set to "Yes" or "No"

Installing the Android SDK

Now for the final part of the installation. Getting the Android SDK and downloading all the goodies into Eclipse. The Android SDK is a collection of files and utilities that work together in the Eclipse IDE so you can create your Android Applications. Here is the location for the Android SDK: http://developer.android.com/sdk/index.html

Once you have the file downloaded you’ll need to unZip the file. This is where the fun starts. The extracted files will be in a folder called “android-sdk-windows” or “android-sdk-mac” depending on your OS. Since this will be accessed by Eclipse it’s up to YOU on where to keep the folder. Some people put it in the root of their hard drive while I’ve seen others put it inside their eclipse folders so it will all be “together”. While it doesn’t matter where you put it on your hard drive I seem to prefer that it is within your existing eclipse folder so you will know exactly where it is.

Now lets bring the two together (Eclipse with Android SDK).

Launch Eclipse. From the Eclipse menu go to Help -> Install New Software:

Android SDK Installation into Eclipse

Android SDK Installation into Eclipse

Click on the Add… button and then you will need to enter a Name and Location. The name can be anything you want but make it meaningful such as “Android Plugins”. For the Location field you can enter in:
https://dl-ssl.google.com/android/eclipse
or
http://dl-ssl.google.com/android/eclipse

Adding Android Plugins to Eclipse

Adding the Android Plugins to Eclipse

From here you can Click OK. After a few moments you’ll see a list of Developer Tools which will be checked. Go ahead and click Next>. You will probably get asked to accept the terms of agreement so go ahead and click OK. Once the installation has gone thorough it’s steps, you will have to restart Eclipse.

Great! Now that Eclipse has been restarted let tell it where the Android SDK is. For MAC users it’s under Eclipse -> Preferences and then selecting “Android” in the Left column. Windows users should get the same thing under Windows -> Preferences

Linking the SDK in Eclipse

For MAC, Eclipse -> Preferences, select Android, browse to SDK folder, hit OK

When you click the “browse” button, go to the folder where YOU saved the SDK. Do not use what I have in the screen shot. Once you click OK, you have just linked up Eclipse with the Android SDK.

Not so bad right? But wait, as will any technology, it gets old fast. It’s no different with the Adroid SDK and although you are jsut about done there is one FINAL highly recommended step. Updating the Android SDK which takes, well, a long time.

Updating the Android SDK

As a safety precaution, while in Eclipse, go under Help -> Check for Updates. This will ensure that you have the latest SDK update from Android which you just downloaded a little while ago. There should be no update here as you just downloaded and installed the SDK. It’s also a good reference to know where this is because unlike windows and MAC’s automated updates . . . you WILL NOT get notification and reminders about updating your SDK.

The second thing you need to do is go under “Window” -> Android SDK and AVD Manager from the Eclipse menu.

Updatign the Android SDK

Windows -> Android ADK and AVD Manager

Once you are in the Android SDK and AVD you can look at your Installed packages. Below is a screen shot of everything that is in my system. You’re should have a lot less because you didn’t install the “Available Packages” yet.

Android SDK AVD Manager

The Android SDK AVD Manager Screen within Eclipse

Once you click on Available packages you should just simply select everything and click “Install” on the bottom. Like before, you will have to accept some user agreements so go ahead and Accept. Sit back, relax and now is the time to go do something else. This WILL TAKE TIME to download.

Basically, from here on, you have completed the installation of Android and Eclipse onto your system. You will most likely be asked to restart Android when the downloads are complete.

Some side notes:
You do not have to download some of the crazy packages that are there especially if you are not going to be developing for them. There are things like dual screen that I know I’ll never develop for but you get the idea. Quickly look over them and install as much as you can but not every single one is necessary. They will be there if you ever need in the future.

Next post will cover Setting up the Android Emulator.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: