Getting started with the Android SDK

If you’re a newcomer into the Android world and want to start your adventure into Android development, you wont get very far without first setting up the Android SDK.

It can seem overwhelming setting up the Android SDK for the first time, but it’s actually pretty straight forward.

First things first, its important to note that I will be covering this on a Windows based PC. Depending on your configuration the instructions may be slightly different but they should be similar enough to work your way through it. I’m not here to start a debate, I use both Linux and Windows, but my preferred development environment when it comes to Android is Windows.

Downloading The Android SDK

First you will want to head on over to the Android SDK download page and start your download. As of writing this, there are two options. The first is the “Eclipse ADT with Android SDK“. This is the one that I will be covering on how to use (for now). The other is the “Android Studio Beta” which will at some point replace Eclipse ADT.

To get started with the download, click the blue “Download Eclipse ADT with Android SDK” button on the Android SDK page linked above. Normally I would be nice and throw a direct link here, but trust me, you’re going to spend a lot of time on the Android Developers site if your serious about becoming an Android developer, so might as well get used to this page sooner rather than later!

download-adt-with-android-sdk

This will take you to an agreement page. Again depending on your configuration the next steps may vary slightly but this page should auto detect which OS your using so you simply need to choose your architecture (32 bit or 64 bit).

android-sdk-agreement

Once you accept the agreement, your 354 MB download will begin. The time to download will obviously vary depending on your internet speed.

android-sdk-download

Extracting the Android SDK

Next we need to install it. Hopefully you remembered where you saved the zip file to! Since we’re using a Windows PC, you should be able to extract the zip file without any additional software. Simply right click the zip file and click “Extract All“. This will pop up the extraction wizard. I would recommend extracting it to the desktop for ease of access, but this is ultimately your choice on where to extract the files to. Depending on your computers speed, time to extract will vary (but hopefully you’re using a faster computer than mine, which I believe was the first PC the dinosaurs used!)

extract-android-sdk

 

Installing the Android SDK

All right, so you’ve downloaded the Android SDK, you’ve extract it to some place easily accessible… now what? Well my friend, now we need to go through the installation of the platform you’ll be developing for. The nice thing about the ADT is that there is no installation process for . Once the files are extracted, you are free to move or rename the folder as much as your little heard desires. If you open the folder, you’ll see two folders (eclipse and sdk) and one executable (SDK Manager).

android-sdk-adt-folder

The eclipse folder is where the IDE (Integrated Development Environment) is located. We will be working with this a little later.

The sdk folder is where the files from the SDK Manager will be downloaded to and stored.

The SDK Manager is the tool used to download the different parts of the SDK that you will need over the course of development.

Before we go any further, to make things easier, lets rename the ADT folder from “adt-bundle-windows-x86_64-20140702” to just “Android ADT“. We will refer to this as the ADT folder from here on out.

Lets go ahead and double click on SDK Manager to open it up.

You’ll be presented with all the different available parts of the SDK such as extras (usb driver, Google Play Services, etc.) as well as different platforms and APIs. To get started, we want to download and install API 20 which is for the upcoming “L” release of Android. Simply put a check mark in the box beside “SDK Platform Android L Preview” and click “Install Packages“. At this point you’ll be prompted to accept the license agreement before installing.

android-sdk-manager

When finished, you can go ahead and close the SDK Manager.

Download and Install JDK

Going back to the Android ADT folder we extracted previously, if you attempt to open eclipse.exe in the eclipse folder you will most likely be greeted with an error about missing JDK.

jdk-missing

If you do see this error, then we need to download and install the Java Development Kit (JDK) from here. Simply find your platform (in my case Windows x64) and click the download link on the right.

jdk-download

When the download finishes, simply run the JDK installation file and follow the on screen prompts. You can use the NNNF method here if you wish (Next, Next, Next, Finish). When its done, you should see a screen that says successfully installed.

java-jdk-installed

 

Opening Eclipse for the first time

With the SDK downloaded and the JDK now installed, we’re ready to open Eclipse for the first time. Open up your Android ADT folder again, open the eclipse folder and run eclipse.exe. Since this is the first time it has been opened, we need to set a location for the “Workspace”, which is just a location for Eclipse to store all your project files. I recommend making a new child folder called “workspace” inside the Android ADT folder, but you could place the workspace folder anywhere on your computer. Hit “OK” when you’ve chosen the folder. You can choose

eclipse-workspace

 

A few moments later, eclipse will open and you’ll be ready to start writing the next big thing on Android! Stay tuned as I write posts going deeper and deeper into Android development

eclipse

Leave a Reply

Your email address will not be published. Required fields are marked *