0% found this document useful (0 votes)
62 views23 pages

Prof. Snehal S. Shinde: Setting Up Your Android Development Environment

Android applications can be developed on windows, macintosh, or Linux systems. To develop Android applications, you need the following software installed on your computer: The Java Development Kit (jdk) Version 5 or 6; The Android Development Tools (adt) plug-in for Eclipse. To install and debug Android applications on Android devices, you need via to the configure USB your as operating system to access the phone cable.

Uploaded by

Pooja Bk
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views23 pages

Prof. Snehal S. Shinde: Setting Up Your Android Development Environment

Android applications can be developed on windows, macintosh, or Linux systems. To develop Android applications, you need the following software installed on your computer: The Java Development Kit (jdk) Version 5 or 6; The Android Development Tools (adt) plug-in for Eclipse. To install and debug Android applications on Android devices, you need via to the configure USB your as operating system to access the phone cable.

Uploaded by

Pooja Bk
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Prof. Snehal S.

Shinde
Setting Up Your Android Development Environment

Configuring Your Development Environment Android applications can be developed on Windows, Macintosh, or Linux
systems.

To develop Android applications, you need to have the following software installed on your computer:

The Java Development Kit (JDK) Version 5 or 6, available for download at http://java.sun.com/javase/downloads/index.jsp. A compatible Java IDE such as Eclipse along with its JDT plug-in, available for download at http://www.eclipse.org/downloads/. The Android SDK, tools and documentation, available for download at

http://developer.android.com/sdk/index.html. The Android Development Tools (ADT) plug-in for Eclipse, available for download through the Eclipse software update mechanism. For instructions on how to install this plug-in, see http://developer.android.com/sdk/eclipse-adt.html.

Configuring Your Operating System for Device Debugging

To install and debug Android applications on Android devices, you need via to the configure USB your as operating system to access the phone cable shown in Fig. a).

For Windows installations, you need to install the appropriate USB driver.

Fig. a) Android Application debugging using the Emulator and an Android Handset

Configuring Your Android Hardware for Debugging


Android devices have debugging disabled by default.

Your Android device must be enabled for debugging via a USB connection.

Enable your device to install Android applications by selecting Home, Menu, Settings, Applications and check (enable) the option called Unknown Sources.

Some important development settings are Home, Menu, Settings, Applications, Development Figure b). Here you should enable the following options: (see

USB Debugging: This setting enables you to debug your applications via the USB connection.

Stay Awake: This convenient setting keeps the phone from sleeping in the middle of your development work, as long as the device is plugged in. Allow Mock Locations: This setting enables you to send mock location information to the phone for development purposes and is very convenient for applications using location-based services (LBS).

Fig. b) Android Debug Settings

Exploring the Android SDK


The Android SDK comes with Five Major Components:
A. The Android SDK License Agreement

B. The Android Documentation

C. Application Framework

D. Tools and

E. Sample Applications.

A. The Android SDK License Agreement

Before you can download the Android SDK, you must review and agree to the Android SDK License Agreement.

This agreement is a contract between you (the developer) and Google (copyright holder of the Android SDK).

B. The Android SDK Documentation


A local copy of the Android documentation is provided in the /docs subfolder on disk. The documentation is divided into seven main sections:

1.

The Home Tab: It provides Developer announcements and important links to the latest hot topics in Android development.

2.

The SDK Tab: It provides Information about the different Android SDK versions available. Information about the Android Native Development Kit (NDK). Android SDK release notes

3. The Dev Guide Tab:


It introduces the Android platform Covers best practices for Android application design & development and information about publishing applications

5. The Reference Tab:


Provides a drill-down listing of the Android APIs with detailed coverage of specific classes and interfaces

5. The Resources Tab:


Provides access to Android technical articles and tutorials Provides links to Android community online (groups, mailing list, and official Twitter feed), as well as the sample applications provided along with the Android SDK

6. The Videos Tab:


Provides access to online videos pertaining to Android development, including videos about the platform, developer tips, Android

development sessions from the annual Google I/O conference, and developer sandbox interviews.

7. The Blog Tab: It provides


access to the online blog published by the Android development team. announcements about SDK releases, helpful development tips, and notices of upcoming Android events.

C. The Android Application Framework

The Android application framework is provided in the android.jar file.

The Android SDK is made up of several important packages.

Important Packages in the Android SDK


Top-Level Package android.* dalvik.* java.* javax.* Purpose Android application fundamentals Dalvik Virtual Machine support classes Core classes and familiar generic utilities for networking, security, math, and such. Java extension classes including encryption support, parsers, SQL, and such. Unit testing support JavaScript Object Notation (JSON) support W3C Java bindings for the Document Object Model Core (XML and HTML) Simple API for XML (SAX) support for XML High-performance XML parsing

junit.* org.json org.w3c.dom

org.apache.http.* Hypertext Transfer Protocol (HTTP) protocol

org.xml.sax.* org.xmlpull.*

D. The Android Tools


The Android SDK provides many tools to design, develop, debug, and deploy your Android applications. The Eclipse Plug-In incorporates many of these tools seamlessly into your development environment and provides various wizards for creating and debugging Android projects.

Some of the Tools are:


Android SDK and AVD Manager Android Emulator Dalvik Debug Monitor Server (DDMS) Android Debug Bridge (ADB) Android Hierarchy Viewer Draw Nine-patch Tool Layoutopt Tool

Android SDK and AVD Manager

This tool performs two major functions:


Management of multiple versions of the Android SDK on the development machine and Management of the developers Android Virtual Device (AVD) configurations.

It facilitate Android development across multiple platform versions simultaneously. The AVD profile describes what type of device you want the emulator to simulate, including which Android platform to support.

Android Emulator

This

tool

is

used

frequently

when

designing applications

and

developing

Android

The emulator runs on your computer and behaves much as a mobile device would.

You can load Android applications into the emulator, test, and debug them.

The emulator is a generic device and is not tied to any one specific phone configuration.

Fig. c) The Android Emulator

Dalvik Debug Monitor Server (DDMS)

It is a command-line tool. This tool provides you with direct access to the devicewhether its the emulator virtual device or the physical device. DDMS is used to view and manage processes and threads running on the device, view heap data, attach to processes to debug, and a variety of other tasks.

Android Debug Bridge (ADB)


ADB is a client-server tool. It is used to enable developers to debug Android code on the emulator and the device using a standard Java IDE such as Eclipse. The DDMS and the Android Development Plug-In for Eclipse both use the ADB to facilitate interaction between the development environment and the device (or emulator). Developers can also use ADB to interact with the device file system, install Android applications manually, and issue shell commands.

Android Hierarchy Viewer

It is a visual tool. It illustrates layout helps component developers

relationships,

design and debug user interfaces. Developers can use this inspect the View develop pixel-perfect layouts. tool to and

properties

Other Tools

Draw Nine-patch Tool: It enables you to design stretchable PNG images, which is useful for supporting different screen sizes. Layoutopt Tool: It helps developers optimize their user interfaces for performance.

E. The Android Sample Applications

The Android SDK provides many samples and demo applications to help you learn the ropes of Android Development. Many of these demo applications are located in the /samples subdirectory of the Android SDK. Some of the demo applications are:
ApiDemos Snake NotePad LunarLander

Thank You

You might also like