搜档网
当前位置:搜档网 › Android开发工具下载与配置说明书(原版)

Android开发工具下载与配置说明书(原版)

ADT Plugin for Eclipse

In this document

See also

Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications.

ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) .apk files in order to distribute your application.

Developing in Eclipse with ADT is highly recommended and is the fastest way to get started. With the guided project setup it provides, as well as tools integration, custom XML editors, and debug output pane, ADT gives you an incredible boost in developing Android applications.

This document provides step-by-step instructions on how to download the ADT plugin and install it into your Eclipse development environment. Note that before you can install or use ADT, you must have compatible versions of both the Eclipse IDE and the Android SDK installed. For details, make sure to read Installing the ADT Plugin, below.

If you are already using ADT, this document also provides instructions on how to update ADT to the latest version or how to uninstall it, if necessary.

For information about the features provided by the ADT plugin, such as code editor features, SDK tool integration, and the graphical layout editor (for drag-and-drop layout editing), see the Android Developer Tools document.

Revisions

The sections below provide notes about successive releases of the ADT Plugin, as denoted by revision number.

For a summary of all known issues in ADT, see https://www.sodocs.net/doc/832102162.html,/knownissues.

ADT 16.0.1(December 2011)

Dependencies:

?Eclipse Helios (Version 3.6) or

higher is required for ADT 16.0.1.

?ADT 16.0.1 is designed for use

with SDK Tools r16. If you haven't

already installed SDK Tools r16

into your SDK, use the Android

SDK Manager to do so.

Bug fixes:

?Fixed build issue where the

9-patch could be packaged as

normal bitmap in some cases.

?Fixed minor issues in the Lint tool.

?Fixed minor issues in the SDK

Manager.

ADT 16.0.0(December 2011)

Dependencies:

?Eclipse Helios (Version 3.6) or

higher is required for ADT 16.0.0.

?ADT 16.0.0 is designed for use

with SDK Tools r16. If you haven't

already installed SDK Tools r16

into your SDK, use the Android

SDK Manager to do so.

General improvements:

?Added Lint tool to detect common

errors in Android projects. (more

info)

ADT 15.0.1(November 2011)

Dependencies:

ADT 15.0.1 is designed for use

with SDK Tools r15. If you haven't

already installed SDK Tools r15

into your SDK, use the Android

SDK Manager to do so.

Bug fixes:

?Fixed how source files are

attached to library project .jar

files.

?Fixed how the bin/ folder for

library projects are refreshed. This

ensures that parent projects pick

up changes in library projects.

?Fixed how a parent project's library

container is updated when a library

project is recompiled. This ensures

that parent projects are recompiled

when code in a library project

changes.

?Fixed how res/ folders are

checked in library projects. This

ensures that all res folders are

properly included even if Eclipse is

not aware of them due to refresh

issues.

?Fixed issue that prevented aapt

from running when editing certain

XML files.

?Fixed minor XML formatting

issues.

ADT 15.0.0(October 2011)

Dependencies:

ADT 15.0.0 is designed for use

with SDK Tools r15. If you haven't

already installed SDK Tools r15

into your SDK, use the Android

SDK Manager to do so.

Bug fixes:

?Fixed build issue when using

Renderscript in projects that target

API levels 11-13 (Issue 21006).

?Fixed issue when creating projects

from existing source code.

?Fixed issues in the SDK Manager

(Issue 20939, Issue 20607).

?Fixed scrolling issue in the new

Logcat panel of DDMS.

ADT 14.0.0(October 2011)

Dependencies:

ADT 14.0.0 is designed for use

with SDK Tools r14. If you haven't

already installed SDK Tools r14

into your SDK, use the Android

SDK Manager to do so.

Build system:

?Changed

default.properties to

project.properties and

build.properties to

ant.properties. ADT

automatically renames these files,

if necessary, when you open a

project in Eclipse.

?Changed how library projects are

built in Eclipse.

?Changed output of javac from

bin/ to bin/classes in

Eclipse.

?Improved incremental builds so

that resource compilation runs less

frequently. Builds no longer run

when you edit strings or layouts

(unless you add a new id) and no

longer run once for each library

project.

?Introduced a "PNG crunch cache"

that only runs on modified PNG

files, instead of crunching all

existing PNG files, all the time.

?Modified resource compilation so it

no longer happens for normal save

operations. It only happens when

running or debugging (the build

option that lets you disable the

packaging step, which was

introduced in ADT 12, is now on by

default.)

For a complete overview of the

build system changes and what

you need to do to support them,

see the Android Tools Project site. General improvements:

?Added a Welcome Wizard to help

with the initial setup of the Android

development environment (more

info).

?Integrated the Android Asset

Studio, which helps you create

icons for things like the launcher,

menus, and tabs. (more info).

?Revamped the Logcat view and

added support to display and filter

logs by application names as well

as PIDs (more info).

?Revamped the SDK Manager UI

(more info).

?Revamped the New Project and

the New XML File wizards to have

multiple pages. Sample projects

are now copied into the workspace

such that they can be modified and

deleted without affecting the

master copy (more info).

?Removed the dependency on

Eclipse GEF.

XML and Java editors:

?Added a new XML formatter that

formats all XML files according to

the standard Android coding style.

The formatter can also reorder

attributes to follow a recommended

order and processes any changes

made in the Layout editor. (more

info).

?Added the "Go to Matching"

(Ctrl-Shift-P) feature, which lets

you jump between opening and

closing tags in XML files.

?Added support for the "Select

Enclosing Element" feature on

Mac.

?Added a Quickfix for extracting

Strings when the caret is inside a

String (see more).

?Improved "smart indent", which

allows automatic indentation and

un-indentation when pressing the

Return key in XML editors (more

info).

Layout editor:

?Added tooltip feedback for

dragging and resizing operations.

For example, when dragging in a

relative layout, the proposed

constraints are shown. When

resizing, the new dimensions are

shown (more info).

?Added the ability to suppress

rendering fidelity warnings (more

info).

?Added "Remove Container" visual

refactoring that removes the

children of a container up to the top

level and transfers namespace and

layout attributes if necessary (more

info).

?Added pull-right menus to the

context menu for accessing

properties of the parents, which is

useful when the children fully cover

the parent and make it hard to

select on their own.

?Improved access to properties in

the context menu. The most

frequently set attributes for each

view are listed at the top of the

menu. The Properties menu offers

access to the most recently set

attributes, attributes organized by

their defining view, and layout

attributes only or all attributes

alphabetically (more info).

Bug fixes:

Fixed many bugs and added minor

improvements, in particular some

critical bug fixes on Linux.

ADT 12.0.0(July 2011)

Dependencies:

ADT 12.0.0 is designed for use

with SDK Tools r12. If you haven't

already installed SDK Tools r12

into your SDK, use the Android

SDK and AVD Manager to do so.

Visual Layout Editor:

?New RelativeLayout drop support

with guideline suggestions for

attachments and cycle prevention

(more info).

?Resize support in most layouts

along with guideline snapping to

the sizes dictated by

wrap_content and

match_parent. In LinearLayout,

sizes are mapped to weights

instead of pixel widths. (more info).

?Previews of drawables and colors

in the resource chooser dialogs

(more info).

?Improved error messages and links

for rendering errors including

detection of misspelled class

names (more info).

Build system:

? A new option lets you disable the

packaging step in the automatic

builders. This improves

performance when saving files by

not performing a full build, which

can take a long time for large

projects. If the option is enabled,

the APK is packaged when the

application is deployed to a device

or emulator or when the release

APK is exported (more info).

Bug fixes:

Many bug fixes are part of this

release (more info).

ADT 11.0.0(June 2011)

Dependencies:

ADT 11.0.0 is designed for use

with SDK Tools r11. If you haven't

already installed SDK Tools r11

into your SDK, use the Android

SDK and AVD Manager to do so.

Visual Refactoring:

?"Extract Style" feature pulls out

style-related attributes from your

layout and extracts them as a new

style defined in styles.xml

(more info).

?"Wrap in Container" feature lets

you select a group of views then

surround them in a new layout (a

new view group, such as a

LinearLayout), and transfers

namespace and layout parameters

to the new parent (more info).

?"Change Layout" feature changes

layouts from one type to another,

and can also flatten a layout

hierarchy (more info).

?"Change Widget Type" feature

changes the type of the selected

views to a new type. Also, a new

selection context menu in the

visual layout editor makes it easy

to select siblings as well as views

anywhere in the layout that have

the same type (more info).

?"Extract as Include" feature finds

identical collections of views in

other layouts and offers to combine

them into a single layout that you

can then include in each layout

(more info).

?Quick Assistant in Eclipse can be

invoked from the XML editor (with

Ctrl-1) to apply any of the above

refactorings (and Extract String) to

the current selection (more info). Visual Layout Editor:

?This is the update to the layout

editor you've been waiting for! It

includes (almost) all the goodies

demonstrated at Google I/O.

Watch the video on YouTube.

?The palette now supports different configurations for supported

widgets. That is, a single view is

presented in various different

configurations that you can drag

into your layout. For example,

there is a Text Fields palette

category where you can drag an

EditText widget in as a

password field, an e-mail field, a

phone field, or other types of text

boxes. Similarly, TextView

widgets are preconfigured with

large, normal and small theme

sizes, and LinearLayout

elements are preconfigured in

horizontal and vertical

configurations (more info).

?The palette supports custom views.

You can pick up any custom

implementations of the View class

you've created in your project or

from included libraries and drag

them into your layout (more info). ?Fragments are available in the palette for placement in your layout.

In the tool, you can choose which

layout to show rendered for a given

fragment tag. Go to declaration

works for fragment classes (more

info).

?The layout editor automatically applies a "zoom to fit" for newly

opened files as well as on device

size and orientation changes to

ensure that large layouts are

always fully visible unless you

manually zoom in.

?You can drop in an element from the palette, which will

pop up a layout chooser. When

you select the layout to include, it

is added with an .

Similarly, dropping images or

image buttons will pop up image

resource choosers (more info).

?The configuration chooser now

applies the "Render Target" and

"Locale" settings project wide,

making it trivial to check the

layouts for different languages or

render targets without having to

configure these individually for

each layout.

?The layout editor is smarter about

picking a default theme to render a

layout with, consulting factors like

theme registrations in the manifest,

the SDK version, and other factors.

?The layout editor is smarter about

picking a default configuration to

render a layout with, defaulting to

the currently visible configuration in

the previous file. It also considers

the SDK target to determine

whether to default to a tablet or

phone screen size.

?Basic focus support. The first text

field dropped in a layout is

assigned focus, and there are

Request Focus and Clear Focus

context menu items on text fields to

change the focus.

XML editors:

?Code completion has been

significantly improved. It now

works with