{infiniteZest}
// Articles. Tutorials. Utilities.
Home  |   Search  |   Login  
Categories Skip Navigation Links
New / All
AJAX
Apple
ASP.NET
.NET
Git
Google / Android
Python / IronPython
Miscellaneous
SQL Server
Getting started with the Android SDK and plugins for Eclipse
Summary
After installing Eclipse, the next step to do for a productive Android development is to install the sdk and plugin. This article has notes, screenshots, and thoughts on this.
 
Table of Contents

Android SDK

Android Plugin for Eclipse

Installing the Android Plugin

Figure 1. Installing the Android Plugin

Figure 2. The Android Plugin from the Google site

Figure 3. Setting Android plugin preferences from Eclipse

Ready from Eclipse

Figure 4. Android Project Wizard from Eclipse

Figure 5. The Snake Sample project from Android Samples

Figure 6. The Snake program in Android Emulator

Pictures ...

More Articles ...

 
Article Series
Previous Article:
Development tools for Android - Eclipse
This article is part of the Series:
Article Series: Getting Started with Google Android
Next Article:
Pictures of Games on Google Phone / Android

Android SDK

Android SDK (Software Development Kit) is the library for developing Android applications (it also has documentation, samples and additional tools for development). The Android SDK is available from here: http://code.google.com/android/download.html

Installing the Android SDK is straightforward – downloading the zip file and unzipping into your favorite directory. I installed the SDK into D:\android, so all the android SDK files are installed into this long long directory: D:\android\android_sdk_windows_m3-rc20a.

If you have any issues with the built-in unzip in Windows Vista, you might want to use a program like 7-Zip. The Eclipse site hints there might be some issues with unzipping into long directory names with the built-in unzip program on Windows. I used 7-Zip for both Eclipse and Android SDK and there were no problems.

Once you extracted the files, there will be three directories under the android_sdk_windows_m3-rc20a:
  • docs
  • samples
  • tools
Under the tools directory, there are several important tools:
  • emulator.exe (Android Emulator)
  • adb.exe (Android Debug Bridge)
  • aapt.exe (Android Asset Packaging Tool – creates the binaries)
  • aidl.exe (Android Interface Description Language)
  • ddms.bat (Dalvik Debug Monitor Service – Dalvik is Android’s Virtual Machine)
  • dx.bat (Converts .class to .dex. Dalvik the VM understands .dex format)
For all these tools to be usable, their directory (here D:\android\android_sdk_windows_m3-rc20a\tools) should be in the path. If you install the Android Plugin (below) and run these programs from there, you don’t need to add the directory to the path (you will set it up from Eclipse).

Android Plugin for Eclipse

This makes Eclipse a better environment for developing Android applications. The tools mentioned above will become accessible from the Eclipse environment. Creating a new Android project becomes easy.

If you have worked in the Visual Studio environment, this plugin is like a template in Visual Studio. You would use, for example, a Windows Application template or ASP.NET Web Application template for creating a new project for windows or web respectively. Similarly, Android plugin helps create an Android project easily from Eclipse.

Installing the Android Plugin

Unlike Eclipse or Android SDK, there are no zipped downloads for the plugin. The Eclipse environment itself provides a way to download and update the plugins from the corresponding website.

Figure 1. Installing the Android Plugin

Installing the Android Plugin
As shown in Figure 1, from Eclipse use Help – Software Updates – Find and Install – Search for New Features to Install to enter the Android Plugin site details (https://dl-ssl.google.com/android/eclipse). For the latest, follow the plugin installation directions.

Figure 2. The Android Plugin from the Google site

The Android Plugin from the Google site
The Figure 2 shows the Android plugin that Eclipse found at the Google site. Select the Plugin to install.

Figure 3. Setting Android plugin preferences from Eclipse

Setting Android plugin preferences from Eclipse
There is one final thing to do to set up the Android plugin. As shown in Figure 3, from Eclipse – Window – Preferences, setup the SDK location. After setting this up, some of the tools in the Android SDK directory might access the Internet (your anti-virus program might alert you).

Ready from Eclipse

Now you are ready to create Android projects from Eclipse. As shown in Figure 4, when you choose File – New – Project, you will be shown the New Project window. Here you can choose Android Project.

Figure 4. Android Project Wizard from Eclipse

Android Project Wizard from Eclipse
And finally, as shown in Figure 5, I wanted to open up the Snake sample provided in the SDK samples. For this, choose ‘Create project from existing source’ in the New Android Project window and select the Snake directory from Samples. This will set the package name, activity name, and application name for you.

Figure 5. The Snake Sample project from Android Samples

The Snake Sample project from Android Samples
In order to run this program, right-click on the newly created project (here AndroidSnake) and choose Run As – Android Application. You will see the Andriod Emulator window with the snake game, as shown in Figure 6.

Figure 6. The Snake program in Android Emulator

The Snake program in Android Emulator
Snake is a simple mobile phone game where the snake head eats those yellow bits on the screen (those yellow bits are called apples har har har :-). With each eating, the snake becomes longer and you need ‘skill’ and ‘agility’ to move the snake around to eat more apples.

Pictures ...

Following articles have some screenshots of Android:

Pictures of Games on Google Phone / Android
This article contains the screenshots of sample games in the Google Phone emulator (the emulator from the Android).

Pictures of Main User Interface and Web on Google Phone / Android
This article has screenshots of the main interface of a Google Phone (or the basic set of Android features). Also has various screenshots of the web browser built into Android.

Pictures of basic functionality on a Google Phone / Android
This article shows the pictures of interest to the developers of applications on Google Phone / Android. These are the pictures of API Demos and built-in Developer Tools.

More Articles ...

In this set of introductory articles for getting ready for Android development, you many want to peruse the following articles:

Development tools for Android - Eclipse
This article looks at getting started with Eclipse for Android, especially if you have not done much of Eclipse development or have been a Visual Studio developer.

Getting started with the Android SDK and plugins for Eclipse
Eclipse at its core is a small platform runtime with a whole bunch of plugins providing the functionality for each area. So, the next step in getting ready for Android development is to install the appropriate plugin.

Article Series
Previous Article:
Development tools for Android - Eclipse
This article is part of the Series:
Article Series: Getting Started with Google Android
Next Article:
Pictures of Games on Google Phone / Android
Bookmark and Share This

More Articles With Similar Tags
icon-android-debug-toolbar.jpg
This article gives some quick pointers on how to start debugging an Android application, along with where to put the breakpoints and how to change the emulator sizes from within Eclipse.
icon-android-safari-browser-user-agent-string.jpg
This article talks about the basics of the browser (including the user agent string) used in the Android platform.
This article talks about various aspects of creating an SQLite database. It also uses Android SQLite shell as an example.
This article explains how to get pretty / nice output from the SQLite command line shell program.
icon-android-emulator-hvga-p-lunar-lander.jpg
See the images of various skins and screens of Android emulator with games (Lunar Lander and Snake) in them. Also shows how to change the skins of Android emulator while debugging your program.
About  Contact  Privacy Policy  Site Map