For the current SDK release, see the links under Current SDK Release in the side navigation.
This page describes how to install the Android 1.0 SDK, Release 2, and set up your development environment. If you haven't downloaded the SDK yet, you can so from the Download page.
Before you begin, be sure that your development environment meets the SDK System Requirements. If you encounter any problems during installation, see the Installation Notes at the bottom of this page.
If you have already developed applications using an earlier version of the SDK, please skip this page and read the Upgrading the SDK document instead.
After downloading the SDK, unpack the .zip archive to a suitable location on your machine. By default, the SDK files are unpacked into a directory named android_sdk_<platform>_<release>_<build>
. The directory contains a link to a local copy of the documentation and the subdirectories tools/
, samples/
, and others.
Make a note of the name and location of the unpacked SDK directory on your system — you will need to refer to the SDK directory later, when setting up the Android plugin or using SDK tools.
Optionally, you can add the path to the SDK tools
directory to your path. As mentioned above, the tools/
directory is located in the SDK directory.
tools/
directory to it. If you don't
see a line setting the path, you can add one:export PATH=${PATH}:<your_sdk_dir>/tools
tools/
directory to the path. Adding tools
to your path lets you run Android Debug Bridge (adb) and the other command line tools without needing to supply the full path to the tools directory. Note that, if you update your SDK, you should remember to update your PATH settings to point to the new location, if different.
If you will be using the Eclipse IDE as your environment for developing Android applications, continue reading the next section in order to install the Android Development Tools plugin and setup Eclipse. If you choose not to use Eclipse, you can develop Android applications using other tools — read the guide to developing In other IDEs.
First, you should install a custom plugin called Android Development Tools (ADT), which adds integrated support for Android projects and tools. The ADT plugin includes a variety of powerful extensions that make creating, running, and debugging Android applications faster and easier. Developing in ADT/Eclipse is highly recommended for Eclipse users and those new to Android.
To download and install the ADT plugin, follow the steps below for your respective Eclipse version.
Eclipse 3.3 (Europa) | Eclipse 3.4 (Ganymede) |
---|---|
|
|
Now, you just need to modify your Eclipse preferences to point to the Android SDK directory:
Done! If you haven't encountered any problems, then you're ready to begin developing Android applications. We recommend you begin with the Hello World tutorial, which will teach you some basics about Android applications and how to create projects using Eclipse.
If you are having trouble downloading the ADT plugin after following the steps above, here are some suggestions:
http://dl-ssl.google.com/android/eclipse/
If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you can download the ADT files to your local machine using a browser and the install the files in Eclipse from there:
Note that to update your plugin, you will have to follow these steps again instead of the default update instructions.
Note that the "Android Editors" feature of ADT requires several optional Eclipse components (for example, WST). If you encounter an error when installing ADT, your Eclipse installion might not include those components. For information about how to quickly add the necessary components to your Eclipse installation, see the troubleshooting topic ADT Installation Error: "requires plug-in org.eclipse.wst.sse.ui".
If you encounter this error when installing the ADT Plugin for Eclipse:
An error occurred during provisioning. Cannot connect to keystore. JKS
...then your development machine lacks a suitable Java VM. Installing Sun Java 6 will resolve this issue and you can then reinstall the ADT Plugin.
ia32-libs
package using
apt-get:
:
apt-get install ia32-libs
apt-get install sun-java6-bin