Saturday, July 21, 2012

Installation Android within Eclipse

,

Pre-requisites for using a 64bit Linux

The Android SDK is 32bit, therefore on a 64bit Linux system you need to have the package ia32-libs installed. For Ubuntu you can do this via the following command.

apt-get install ia32-libs 
Please check your distribution documentation, if you are using a different flavor of Linux.

Install ADT Plug-ins and 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/.
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

Manual installation of the Android SDK

After the installation of the ADT the Eclipse tooling allows to download the Android SDK automatically. Alternatively you can also manually download the Android SDK from the Android SDK download page.
The download contains a zip file, which you can extract to any place in your file system, e.g. on my Linux system I placed it under "/home/vogella/android-sdks". Avoid using spaces in the path name, otherwise you may experience problems with the usage of the Android SDK.
You also have to define the location of the Android SDK in the Eclipse Preferences. In Eclipse open the Preferences dialog via the menu 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 15 (Android 4.0.3) version of the SDK and press the Install button.

Install Android API


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

Android Source Code

During Android development it is very useful to have the Android source code available.
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 of Android, e.g. 15 for the Android 4.0.4 version.
To connect the sources with the android.jar file in your Android project, right click on your android.jar in the Eclipse Package Explorer and select PropertiesJava Source Attachment. Type in the source directory name and press the OK button.
Afterwards you can browse through the source code.

(vogella.com)

0 comments to “Installation Android within Eclipse”

Post a Comment

 

Android Development Tutorials Copyright © 2011 -- Template created by O Pregador -- Powered by Blogger Templates