This page describes how to install the Android SDK and set up your development environment. If you haven't downloaded the SDK, you can do so from the Download page. Once you've downloaded the SDK, return here.
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 read Upgrading the SDK, instead.
Before you begin, take a moment to confirm that your development machine meets the System Requirements.
If you will be developing on Eclipse with the Android Development Tools (ADT) Plugin — the recommended path if you are new to Android — make sure that you have a suitable version of Eclipse installed on your computer (3.3 or newer). If you need to install Eclipse, you can download it from this location:
A Java or RCP version of Eclipse is recommended.
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
The directory contains a local copy of the documentation (accessible by opening
documentation.html in your browser) and the subdirectories
platforms/, and others. Inside
each subdirectory of
platforms/ you'll find
samples/, which includes
code samples that are specific to each version of the platform.
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 when using the SDK tools.
Optionally, you may want to add the location of the SDK's primary
to your system PATH. The primary
tools/ directory is located at the root of the
SDK folder. 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.
~/.bashrcfile. Look for a line that sets the PATH environment variable and add the full path to the
tools/directory to it. If you don't see a line setting the path, you can add one:
.bash_profileand proceed as for Linux. You can create the
.bash_profileif you haven't already set one up on your machine.
tools/directory to the path.
Note that, if you update your SDK in the future, 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 development environment, the next section describes how to install the Android Development Tools plugin and set up Eclipse. If you choose not to use Eclipse, you can develop Android applications in an IDE of your choice and then compile, debug and deploy using the tools included in the SDK (skip to Next Steps).
Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT), that is designed to give you a powerful, integrated environment in which to build Android applications. It extends the capabilites of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application.
In general, using Eclipse with ADT is a highly recommended approach to Android development and is the fastest way to get started. (If you prefer to work in an IDE other than Eclipse, you do not need to install Eclipse or ADT, instead, you can directly use the SDK tools to build and debug your application.)
Once you have Eclipse installed, as described in Preparing for Installation, follow the steps below to download the ADT plugin and install it in your respective Eclipse environment.
|Eclipse 3.3 (Europa)||Eclipse 3.4 (Ganymede)|
Now 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. See the Next Steps section for suggestions on how to start.
If you are having trouble downloading the ADT plugin after following the steps above, here are some suggestions:
If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you can download the ADT zip file to your local machine and manually install the it:
To update your plugin once you've installed using the zip file, you will have to follow these steps again instead of the default update instructions.
Note that there are features of ADT that require some optional Eclipse components (for example, WST). If you encounter an error when installing ADT, your Eclipse installion might not include these 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.
Once you have completed installation, you are ready to begin developing applications. Here are a few ways you can get started:
Learn about Android
Explore the SDK
Explore some code
<sdk>/platforms/<platfrom>/samples, then compile and run it in your development environment
Visit the Android developer groups
apt-get install ia32-libs
apt-get install sun-java6-bin