Getting started with Android

[article] [edit page] [discussion] [history]

From Humanitarian-FOSS Project Development Site

This page is meant to complement the official google documentation for installing the Android SDK and setting up the development environment.

You can download the android SDK from here. If you are upgrading, follow this.

Contents

Requirements

There are a few requirements for the best use of the Android SDK.

  • Eclipse 3.2, 3.3
    • Eclipse JDT plugin
    • Eclipse WST plugin

See versions of eclipse chart to download the proper version for all the features provided by the android plugin for eclipse. I recommend downloading the JEE version of eclipse for the best performance as it includes all the requirements. The WST plugins are required for the android editors in eclipse. It extends the features provided by WST plugin for XML editing with the android XML tags. It's really useful for editing layouts.

Installing the SDK

After downloading the SDK, unzip the .zip archive to a suitable location in the computer.

$ unzip android_sdk_linux_m5_r1*zip 

make a note of the SDK location. You will need to substitute that location for <your_SDK_directory>. Yes, including the brackets.

This section is optional It is here so that you can access the emulator and different android tools from anywhere in the command line. This should work for Linux and OSX. For Windows, look down.

$ cat >> ~/.bashrc
export PATH=${PATH}:<your_sdk_directory>/tools

this will add the location of the tools to your path. Remember to update your current settings with:

$source ~/.bashrc

For windows user,

  1. From the desktop, right-click My Computer and click properties.
  2. In the System Properties window, click on the Advanced tab.
  3. In the Advanced section, click the Environment Variables button.
  4. Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.
     C:\Program Files;C:\Winnt;C:\Winnt\System32;<your_SDK_directory>/tools

Installing the Eclipse Plugin

  • Start Eclipse, then select Help > Software Updates > Find and Install....
  • In the dialog that appears, select Search for new features to install and press Next.
  • Press New Remote Site.
  • 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/

Press OK.

  • You should now see the new site added to the search list (and checked). Press Finish.
  • In the subsequent Search Results dialog box, select the checkbox for Android Plugin > Developer Tools. This will check both features: "Android Developer Tools", and "Android Editors". The Android Editors feature is optional, but recommended. If you choose to install it, you need the WST plugin mentioned earlier in this page.

Now press Next.

  • Read the license agreement and then select Accept terms of the license agreement, if appropriate. Press Next.
  • Press Finish.
  • The ADT plugin is not signed; you can accept the installation anyway by pressing Install All.
  • Restart Eclipse.
  • After restart, update your Eclipse preferences to point to the SDK directory:
  • 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 locate the SDK directory.
  • Press Apply, then OK.

References

http://code.google.com/android/intro/installing.html

Personal tools