• No results found

Known issues with DDMS

In document Developing In Eclipse, with ADT (Page 83-88)

To run dumpstate from Dalvik, select Device > Dump device state... in the menu bar.

Examine Radio State

By default, radio state is not output during a standard logcat (it is a lot of information). To see radio information, either click Device > Dump radio state... or run logcat as described in Logging Radio Information.

Stop a Virtual Machine

You can stop a virtual machine by selecting Actions > Halt VM. Pressing this button causes the VM to call Runtime.halt(1).

Known issues with DDMS

DDMS has the following known limitations:

If you connect and disconnect a debugger, ddms drops and reconnects the client so the VM realizes that the debugger has gone away. This will be fixed eventually.

Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License.

Android 2.2 r1 - 14 May 2010 15:20

Site Terms of Service - Privacy Policy - Brand Guidelines

Page 5 of 5 Using the Dalvik Debug Monitor | Android Developers

9/7/2010

file://V:\android-sdk-windows\docs\guide\developing\tools\ddms.html

Other Tools

The sections below describe other tools that you can use when building Android applications.

All of the tools are included in the Android SDK and are accessible from the <sdk>/tools/ directory.

Contents

android mksdcard dx

android

android is an important development tool that lets you:

Create, delete, and view Android Virtual Devices (AVDs). See Android Virtual Devices.

Create and update Android projects. See Developing in Other IDEs.

Update your Android SDK with new platforms, add-ons, and documentation. See Adding SDK Components.

If you develop in Eclipse with the ADT plugin, you can perform these tasks directly from the IDE. To create Android projects and AVDs from Eclipse, see Developing In Eclipse. To update your SDK from Eclipse, see Adding SDK Components.

mksdcard

The mksdcard tool lets you quickly create a FAT32 disk image that you can load in the emulator, to simulate the presence of an SD card in the device. Here is the usage for mksdcard:

mksdcard [-l label] <size>[K|M] <file>

The table below lists the available options/arguments

Argument Description

-l A volume label for the disk image to create.

size An integer that specifies the size (in bytes) of disk image to create. You can also specify size in kilobytes or megabytes, by appending a "K" or "M" to <size>. For example, 1048576K, 1024M.

file The path/filename of the disk image to create.

Page 1 of 2 Other Tools | Android Developers

9/7/2010

file://V:\android-sdk-windows\docs\guide\developing\tools\othertools.html

↑ Go to top Once you have created the disk image file, you can load it in the emulator at startup using the emulator's -sdcard option.

For more information, see Android Emulator.

emulator -sdcard <file>

dx

The dx tool lets you generate Android bytecode from .class files. The tool converts target files and/or directories to Dalvik executable format (.dex) files, so that they can run in the Android environment. It can also dump the class files in a human -readable format and run a target unit test. You can get the usage and options for this tool by using dx --help.

Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License.

Android 2.2 r1 - 14 May 2010 15:20

Site Terms of Service - Privacy Policy - Brand Guidelines

Page 2 of 2 Other Tools | Android Developers

9/7/2010

file://V:\android-sdk-windows\docs\guide\developing\tools\othertools.html

↑ Go to top

Draw 9-patch

The Draw 9-patch tool allows you to easily create a NinePatch graphic using a WYSIWYG editor.

For an introduction to Nine-patch graphics and how they work, please read the section on Nine-patch in the Nine-patch Images topic.

Here's a quick guide to create a Nine-patch graphic using the Draw 9-patch tool. You'll need the PNG image with which you'd like to create a NinePatch.

From a terminal, launch the draw9patch application from your SDK /tools directory.

1.

Drag your PNG image into the Draw 9-patch window (or File > Open 9-patch... to locate the file). Your workspace will now open.

2.

The left pane is your drawing area, in which you can edit the lines for the stretchable patches and content area. The right pane is the preview area, where you can preview your graphic when stretched.

Click within the 1-pixel perimeter to draw the lines that define the stretchable patches and (optional) content area. Right-click (or hold Shift and click, on Mac) to erase previously drawn lines.

3.

When done, select File > Save 9-patch...

4.

Your image will be saved with the .9.png file name.

Note: A normal PNG file (*.png) will be loaded with an empty one-pixel border added around the image, in which you can draw the stretchable patches and content area. A previously saved 9-patch file (*.9.png) will be loaded as-is, with no drawing area added, because it already exists.

Optional controls include:

Zoom: Adjust the zoom level of the graphic in the drawing area.

Patch scale: Adjust the scale of the images in the preview area.

Show lock: Visualize the non-drawable area of the graphic on mouse-over.

Show patches: Preview the stretchable patches in the drawing area (pink is a stretchable patch).

Show content: Highlight the content area in the preview images (purple is the area in which content is allowed).

Show bad patches: Adds a red border around patch areas that may produce artifacts in the graphic when stretched.

Visual coherence of your stretched image will be maintained if you eliminate all bad patches.

Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License.

Android 2.2 r1 - 14 May 2010 15:20

Site Terms of Service - Privacy Policy - Brand Guidelines

Page 1 of 2 Draw 9-patch | Android Developers

9/7/2010

file://V:\android-sdk-windows\docs\guide\developing\tools\draw9patch.html

Page 2 of 2 Draw 9-patch | Android Developers

9/7/2010

file://V:\android-sdk-windows\docs\guide\developing\tools\draw9patch.html

Image of the Android Emulator

In document Developing In Eclipse, with ADT (Page 83-88)