Environment

This chapter covers:

■ Installing the Android SDK

■ Using Eclipse for Android development

■ Fitting it together with the Android Emulator

■ Running and debugging an Android application

This chapter introduces the Android Development Tools chain and provides a hands-on guide to using them as we walk through creating, testing, and debugging a sample application. Upon completing this chapter, you will be familiar with using Eclipse and the Android Development Tools plug-in, navigating the Android SDK and its tools, running Android applications in the emulator, and debugging your application. With these skills in hand, we will look at the Java packages provided in the SDK to better equip you to embrace the development topics introduced later in this book as you prepare to develop your own Android applications.

The core task for a developer when embracing a new platform is getting an understanding of the SDK with its various components. Let's start by examining the core components of the Android SDK, then transition into using the included tools to build and debug an application.

The Android SDK

2.1 The Android SDK

The Android SDK is a freely available download from Google. The first thing you should do before going any further in this chapter is make sure you have the Android SDK installed along with Eclipse and the Android plug-in for Eclipse, also known as the Android Development Tools, or simply ADT. The Android SDK is required to build Android applications, and Eclipse is the preferred development environment for this book. You can download the Android SDK from http://code.google.com/android/ download.html.

TIP The Android download page has instructions for installing the SDK, or you can refer to appendix A of this book for detailed information on installing the required development tools.

As in any development environment, becoming familiar with the class structures is helpful, so having the documentation at hand as a reference is a good idea. The Android SDK includes HTML-based documentation, which primarily consists of Java-doc-formatted pages describing the available packages and classes. The Android SDK documentation is found in the /doc directory under your SDK installation. Because of the rapidly changing nature of this new platform, you may want to keep an eye out for any changes to the SDK. The most up-to-date Android SDK documentation is available at http://code.google.com/android/documentation.html.

0 0

Post a comment