Book Image

Android Development Tools for Eclipse

By : Khirulnizam Abd Rahman, Sanjay Shah
Book Image

Android Development Tools for Eclipse

By: Khirulnizam Abd Rahman, Sanjay Shah

Overview of this book

<p>The increase in Android's popularity with every passing day cannot be understated. This has resulted in a large programmer base willing to contribute to its success. Eclipse has a powerful IDE and has been adopted widely by programmers across the globe. The focus of ADT is to use existing familiar territory and ease development of Android applications. In this sense, ADT provides a one stop solution for Android application development.</p><p>Android Development Tools for Eclipse is a step-by-step guide that provides you with hands-on, practical, and to the point discussion and steps for using Eclipse tools for developing, debugging, and signing Android applications for distribution. It also teaches you to incorporate advertisements to monetize your applications. Every concept and its usage has been demonstrated in this book by implementing them via real world applications.</p><p></p><p>Android Development Tools for Eclipse starts with the installation of ADT, and then discusses important tools before guiding you through Android application development from scratch, demonstrating different concepts and implementation before finally helping you distribute your applications in the Android market. You will start the development of your first application, explore project structure, and add different widgets including multimedia ones.</p><p></p><p>You will learn everything about developing, debugging, testing, distributing, and monetizing your Android application using Eclipse ADT.</p>
Table of Contents (10 chapters)
9
Index

Linking the Android SDK to the Eclipse

Run Eclipse. In the Windows | Preferences, click on Android. Locate the folder of the android-sdk from the step where you installed the android-sdk, as shown in the following screenshot:

Linking the Android SDK to the Eclipse

Android preferences in Eclipse

Click on Apply and hit OK.

The next thing to do is to download the Android APIs and the operating system images. Installing Android SDK is time consuming. It requires a smooth broadband line because after the installation you need to download the API package for Android and Google API.

To start this, click on the Android SDK Manager icon, as shown in the following screenshot:

Linking the Android SDK to the Eclipse

The Android SDK Manager icon

You will be provided with the list of all SDK Platforms for all Android versions. I suggest you be selective, just download your target platform first. If you are to develop an app for Froyo (Android 2.2) you need to download the API version 8. Later, when you have more time, you could come back and download for the other version. If you do not have any time and Internet data constraints then you may download all. It will fetch API packages, Android OS images, debugging tools and other softwares related to Android development.

For this time, we will download the latest SDK with Jellybean system image and API level 16, as shown in the following screenshot:

Linking the Android SDK to the Eclipse

Installing SDK with API level 16

Before hitting the Install button, there is one important tip I'd like to share. While conducting this procedure, we may encounter a connection reset problem for no specific reason. To get over this issue, on the Android SDK Manager window, navigate to Tools | Options. Uncheck the Force https://...sources to be fetched using https://... option, and Close (shown in the following screenshot). You may start the SDK and API installation now:

Linking the Android SDK to the Eclipse

After the SDK, APIs and system images have been downloaded, restart Eclipse. The wait is worth it! After almost a couple of hours of installation and downloading packages, I got this nice graphical interface for the screen layout arrangement, as shown in the following screenshot. Check the Android Preferences window, and you may see the Android 4.1 in the API list. To add another API, again you need to download through the Android SDK Manager:

Linking the Android SDK to the Eclipse

List of Android APIs

To avoid earlier steps on setting up ADT with Eclipse and kick start development please download the ADT bundle from http://developer.android.com/sdk/index.html and follow the steps for setting up at http://developer.android.com/sdk/installing/bundle.html.

In the next chapter, we will look into tools of an ADT environment that eases the development.