System Requirements
1. Supported Operating Systems
* Windows
XP (32-bit) or Vista (32- or 64-bit)
* Mac
OS X 10.4.8 or later (x86 only)
* Linux
(tested on Linux Ubuntu Hardy Heron)
2. Supported Development Environments
* Eclipse
3.4 (Ganymede) or 3.5 (Galileo)
* JDK
5 or JDK 6 (JRE alone is not sufficient)
* Android
Development Tools plugin (optional)
* Not
compatible with Gnu Compiler for Java (gcj)
3.Other Development Environments or IDEs
* JDK
5 or JDK 6 (JRE alone is not sufficient)
* Apache
Ant 1.6.5 or later for Linux and Mac, 1.7 or later for Windows
* Not
compatible with Gnu Compiler for Java (gcj)
Install android_sdk_windows_1.6
After downloading the Android SDK, unpack
the Android SDK.zip archive to a suitable location on your machine. By default,
the SDK files are unpacked into a directory named android_sdk_
<platform>_<release>. Here we are going to install android-sdk-windows-1.6_r1.
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 tools directory 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.
• On Windows,
1. Right-click on My Computer, and select
Properties.
2. Under the Advanced tab, hit the
Environment Variables button, and in the dialog that comes up,
3. Double-click on Path (under System
Variables).
4. Add the full path to the tools/
directory to the path.
Example:
Set variable name as path &
variable value as,like
D:\android-sdk-1.6_r1\tools
• On Linux,
1. Edit your ~/.bash_profile or ~/.bashrc
file.
2. Look for a line that sets the PATH
environment variable and
3. Add the full path to the 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
• On a Mac,
Look in your home directory for
.bash_profile and proceed as for Linux. You can create the .bash_profile if you
haven't already set one up on your machine.
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 (ADT) 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).
Install the ADT Plugin for Eclipse
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—skip to Next Steps.)
Once you have the Eclipse IDE 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.4 (Ganymede)
1. Start Eclipse, then select Help >
Software Updates.... In the dialog that appears, click the Available Software
tab.
2. Click Add Site...
3. In the Add Site dialog that appears,
enter this URL in the "Location" field:
https://dl-ssl.google.com/android/eclipse/
Note: If you have trouble aqcuiring
the plugin, try using "http" in the Location URL, instead of
"https" (https is preferred for security reasons).
4. Click OK.
5. Back in the Available Software view, you
should see the plugin listed by the URL, with "Developer Tools"
nested within it. Select the checkbox next to Developer Tools and click
Install...
6. On the subsequent Install window,
"Android DDMS" and "Android Development Tools" should both
be checked. Click Next.
7. Read and accept the license agreement,
then click Finish
8. Restart Eclipse
Eclipse 3.5 (Galileo)
1. Start Eclipse, then select Help >
Install New Softare.
2. In the Available Software dialog, click
Add....
3. In the Add Site dialog that appears,
enter a name for the remote site (e.g., "Android Plugin") in the "Name"
field.
In the "Location" field, enter
this URL:
https://dl-ssl.google.com/android/eclipse/
Note: If you have trouble aqcuiring the
plugin, you can try using "http" in the URL, instead of
"https" (https is preferred for security reasons).
Click Ok
4. Back in the Available Software view, you
should now see "Developer Tools" added to the list. Select the
checkbox next to Developer Tools, which will automatically select the nested
tools Android DDMS and Android
5 In the resulting Install Details dialog,
the Android DDMS and Android Development Tools features are listed. Click Next
to read and accept the license agreement and install any dependencies, then
click Finish.
6. Restart Eclipse.
Now modify your Eclipse preferences to
point to the Android SDK directory:
1. Select Window > Preferences... to
open the Preferences panel (Mac: Eclipse > Preferences).
2. Select Android from the left panel.
3. For the SDK Location in the main panel,
click Browse... and locate your downloaded SDK directory.
4. Click Apply, then OK.
Done!If you haven't encountered
any problems, then you're ready to begin developing Android applications.