Tutorial Install Eclipse for Android Programming Development

Saturday, January 7, 20120 comments

Before we start this tutorial, make sure that you have already Eclipse installed. For more details please see Eclipse Tutorial

Eclipse and automatic Android SDK

Use the Eclipse update manager to install all available components for the Android Development Tools (ADT) from the URL https://dl-ssl.google.com/android/eclipse/. If you are not familiar with the Eclipse update manager the usage is described in Eclipse update manager.

After the new Android development components are installed you will be prompted to install the Android SDK. You can use the following wizard or go to the next section to learn how to do it manually.

Wizard to install Android SDK - Part 1

Wizard to install Android SDK - Part 2

Wizard to install Android SDK - Part 3

Manually install Android SDK

The previous step downloads the Android SDK automatically for you. You can also download the Android SDK manually from the Android homepage under Android SDK download. The download contains a zip file which you can extract to any place in your file system, e.g. I placed it under "c:\android-sdk-windows". Avoid using spaces in the path name otherwise you may experience problems later.

You also have to define the location of the Android SDK in the Eclipse Preferences. In Eclipse open the Preferences dialog via WindowsPreferences. Select Android and enter the installation path of the Android SDK.

Setting up the Android SDK in the Eclipse Preferences

Install a specific Android version

The Android SDK Manager allows you to install specific versions of Android. Select WindowAndroid SDK Manager from the Eclipse menu.

Starting ADV Manager

The dialog allows you to install new packages and also allows you to delete them.

Select "Available packages" and open the "Third Party Add-ons". Select the Google API 14 (Android 4.0) version of the SDK and press "Install".

Install Android API

Press the "Install" button and confirm the license for all package. After the installation completes, restart Eclipse.

Android Source Code

The following step is optional.

As of Android 4.0

During Android development it is very useful to have the Android source code available as Android uses a lot of defaults.

As of Android 4.0 the Android development tools provides also the source code. You can download it via the Android SDK Manager by selecting the "Sources for Android SDK".

The sources are downloaded to the source directory located in "path_to_android_sdk/sources/android-xx". xx is the api level number (15 for 4.0.3).

In the Eclipse Package Explorer, right click on your android.jar and select PropertiesJava Source Attachment. Type in the source directory name and press OK. Afterwards you can browse through the source code.

Prior to Android 4.0

For earlier versions Haris Peco maintains plugins which provides access to the Android Source code code. Use the Eclipse update manager to install the Android Source plugin from the following update site: "http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update".

More details can be found on the project website.

Share this article :
Powered by Blogger.
Copyright © 2011. Android Tutorials - All Rights Reserved
Proudly powered by Blogger