Вы находитесь на странице: 1из 35

CHAPTER 2

ANDROID DEVELOPMENT TOOLS

Android Development Tools


Developing Android apps requires 3 tools and all are freely available

Eclipse
The first tool required is an IDE, which for Android is Eclipse(http://www.eclipse.org/downloads) which one of the most popular JAVA IDE. The reason for using Eclipse instead of Netbeans is that Google have provided an Eclipse-plugin for Android. Google have not given direct support to Netbeans.

Android SDK

Android Development Tools

The next important piece of software you need to download is, the Android SDK. The Android SDK contains a debugger, libraries, an emulator, documentation,sample code, and tutorials. We can download the Android SDK from
http://developer.android.com/sdk/index.html

Android Development Tools Android Development Tools (ADT )


The Android Development Tools (ADT) plug-in for Eclipse is an extension to the Eclipse IDE that supports the creation and debugging of Android applications. It allows: Create new Android application projects. Access the tools for accessing our Android emulators and devices. Compile and debug Android applications. Export Android applications into Android Packages (APK).

Installation Process
The following slides will guide you through the installation process of all 3 softwares and will also show screenshots

Installing Android SDK


The Android SDK is not a full development environment and includes only the core SDK Tools, which are used to download the rest of the SDK components. To download sdk go to http://developer.android.com/sdk/index.html and download the package by selecting the link For Windows users, the provided .exe file is named installer_r22.0.1-windows.exe. After downloading the file, double-click it to initiate the installation process. The Android SDK Manager window opens.

In this step well see how to use the Android SDK Manager to download and install the important SDK packages required for the development environment. Select Window,Android SDK Manager.The Android SDK Manager that opens up shows the list of all the packages and their installation status.

Adding Platforms and Other Components

The dialog box shows that the Android SDK Tools package is already installed on the machine. To install any other package, we just need to check its check box.

Installing Eclipse
Eclipse IDE is a multilanguage software development platform commonly used for developing Java applications. We can add plugins to extend its features for developing applications in other languages. Eclipse can be downloaded from the following URL: http://www.eclipse.org/downloads/. The Eclipse Classic and the Eclipse IDE for Java Developers are recommended. Just remember that both the JDK and Eclipse must be for the same version, either 32 bit or 64 bit.

Eclipse is a self-contained executable filethat is, all we need to do to install Eclipse is to unzip the downloaded file to any desired folder. To launch Eclipse, run the eclipse.exe file. Eclipse IDE starts by displaying its logo, followed by a Workspace Launcher dialog box. The Workspace Launcher dialog prompts for the location of the workspace folder where the Eclipse project files will be stored

INSTALLING ECLIPSE

Installing the ADT


Android Development Tools (ADT) is installing plug-in for the Eclipse IDE that provides a powerful, integrated environment to build Android applications. It makes the task of developing Android applications easy. It integrates with Eclipse to add functionality for creating, testing, debugging, and deploying Android applications.

To install the ADT plug-in, select the Help, Install New Software... option from the Eclipse IDE. We see a dialog box asking for the location of the website from which we want to install new software. Select the Add button to add a website or repository location. An Add Repository dialog box appears. Enter the name of the repository in the Name text box. Specify the name of the repository as ADT Plug-in, although it can be any other address. In the Location box, specify the location of the repository as https://dlssl.google.com/android/eclipse/ and click OK.

Eclipse accesses the list of developer tools available at the specified site and displays it. In the figure, we can see that an entry named Developer Tools is displayed, along with four child nodes: Android DDMS, Android Development Tools, Android Hierarchy Viewer, and Android Traceview. We need to install all four tools, so select the parent node, Developer Tools (its child nodes will be auto-selected), and select the Next button.

Making the ADT Plug-in Functional


To make the ADT plug-in functional inside Eclipse, the plug-in needs to point to the Android SDK. For this,launch the Eclipse IDE and select the Window, Preferences option. In the Preferences dialog box, select the Android node and set the SDK Location field to specify the path where the Android SDK is installed on your disk

ANDROID VIRTUAL DEVICE


The Android applications that we develop need to be tested and debugged before they are loaded on the actual Android device. The Android SDK provides several emulators called AVD(Android Virtual Device) that we can use to test and debug our applications.

CREATING ANDROID VIRTUAL DEVICE


To create AVDs in Eclipse, select the Window, AVD Manager option. An Android Virtual Device Manager dialog opens. The dialog box displays a list of existing AVDs, letting us create new AVDs and manage existing AVDs. Because we havent yet defined an AVD, an empty list is displayed.

Select the New button to define a new AVD. A Create new Android Virtual Device (AVD) dialog box, appears. The fields are as follows: NameUsed to specify the name of the AVD. TargetUsed to specify the target API level. Our application will be tested against the specified API level. CPU/ABIDetermines the processor that we want to emulate on our device.

SD CardUsed for extending the storage capacity of the device. Large data files such as audio and video for which the built-in flash memory is insufficient are stored on the SD card. SnapshotEnable this option to avoid booting of the emulator and start it from the last saved snapshot. Hence, this option is used to start the Android emulator quickly. SkinUsed for setting the screen size. Each built-in skin represents a specific screen size. You can try multiple skins to see if your application works across different devices. HardwareUsed to set properties representing various optional hardware that may be present in the target device.

Вам также может понравиться