Pages

Friday, May 6, 2011

Android SDK Installation Guide

Here’s a quick start installation guide to get you up and running with the Google Android Software Development Kit (SDK). This guide will describe how to install the Android SDK and set up your chosen development environments. If you’ haven’t already done so you can download the Android SDK from the link below, then we can get started.

First you’ll need to download the Android SDK source files:
( http://code.google.com/android/download.html )

System Requirements

In order to first use the Android SDK code and tools for development you will of course need a suitable environment develop from.

Currently the following operating systems are supported:

  • Windows XP or Vista
  • Mac OS X 10.4.8 or later (x86 only)
  • Linux (tested on Linux Ubuntu Dapper Drake)

You will also need to install a suitable development environment such as:

Installing The Android SDK

First you will need to download the Android SDK pack .zip archive, once downloaded find a suitable installation location on your machine and extract the zipped files.

Please note: This installation location will be referred to as $SDK_ROOT from now on through this tutorial

Alternatively you can add /tools to your root path which will prevent the need to specify the full path to the tools directory along with enabling you to run Android Debug Bridge (adb) along with other command line tools.

To add /tools:

Linux

  1. Edit the ~/.bash_profile or ~/.bashrc files looking for a line that sets the PATH variable.
  2. Add the full path location to your $SDK_ROOT/tools location for the PATH variable.
  3. If no PATH line exists you can add the line by typing the following:
  4. export PATH=${PATH}:

Mac OS X

  1. In the home directory locate the .bash_profile and locating the PATH variable add the location to your $SDK_ROOT/tools folder.

Windows XP / Vista

  1. Right click on the My Computer icon and select the properties tab.
  2. Select the Advanced tab and click the Environment Variables button.
  3. In the new dialog box dowble-click on Path (located under System Variables) and type in the full path location to the tools directory.

The Android SDK also requires a suitable development environment to work in, here’s the installation guides for each of the supported environments.

Android Eclipse Plugin (ADT)

If you choose to use the Eclipse IDE as your Android development environment you will have the opportunity to install and run a plug-in called Android Development Tools. ADT comes with a variety of powerful tools and extensions that will make creating, running and debugging your Android applications much easier and faster.

In order to download and install ADT you will first need to configure an Eclipse remote update, this can achieved via the following steps:

  1. Start Eclipse, then select Help > Software Updates > Find and Install….
  2. In the dialog that appears, select Search for new features to install and press Next.
  3. Press New Remote Site.
  4. In the resulting dialog box, enter a name for the remote site (e.g. Android Plugin) and enter this as its URL: https://dl-ssl.google.com/android/eclipse/.
  5. Press OK.
  6. You should now see the new site added to the search list (and checked).
  7. Press Finish.
  8. In the subsequent Search Results dialog box, select the checkbox for Android Plugin > Eclipse Integration > Android Development Tools and press Next.
  9. Read the license agreement and then select Accept terms of the license agreement, if appropriate.
  10. Press Next.
  11. Press Finish.
  12. The ADT plugin is not signed; you can accept the installation anyway by pressing Install All.
  13. Restart Eclipse.
  14. After restart, update your Eclipse preferences to point to the SDK root directory ($SDK_ROOT):
    Select Window > Preferences… to open the Preferences panel. (Mac OS X: Eclipse > Preferences)
    Select Android from the left panel.
    For the SDK Location in the main panel, press Browse... and find the SDK root directory.
  15. Press Apply, then OK

Updating the ADT Plugin

To update the ADT plugin to the latest version, follow these steps:

  1. Select Help > Software Updates > Find and Install….
  2. Select Search for updates of the currently installed features and press Finish.
  3. If any update for ADT is available, select and install.

Alternatively:

  1. Select Help > Software Updates > Manage Configuration.
  2. Navigate down the tree and select Android Development Tools
  3. Select Scan for Updates under Available Tasks.

No comments:

Post a Comment

Popular Posts