admin 管理员组

文章数量: 887021


2023年12月25日发(作者:bound for)

Installing the SDK安装SDK

Previous以前Next下一个

You should have already downloaded the你应该已经下载了Android SDKAndroid SDK. 。Now you need to set up your development environment.现在您需要设置开发环境。

The SDK you've downloaded is not the complete SDK environment. 你已经下载SDK是不完整的SDK环境。It includes only the core SDK tools, which you can use to download the rest of

the SDK packages (such as the latest system image).它只包含核心SDK工具,您可以使用它来下载其余SDK包(如最新的系统映像)。

Getting started on Windows开始在Windows

Your download package is an executable file that starts an installer. 你的下载包是一个可执行文件,开始一个安装程序。The installer checks your machine for required tools, such as the

proper Java SE Development Kit (JDK) and installs it if necessary. 安装程序检查您的机器所需的工具,���适当的Java SE开发工具包(JDK)并安装它,如果必要的。The installer then

saves the Android SDK Tools into a default location (or you can specify the location).安装Android SDK工具然后保存成一个默认的位置(或者你可以指定位置)。

Make a note of the name and location of the SDK directory on your system—you will need to

refer to the SDK directory later, when setting up the ADT plugin and when using the SDK tools

from the command line.记下的名称和位置SDK目录在你的系统,你需要参阅SDK目录后,当设置ADT插件,当使用SDK工具从命令行。

Once the tools are installed, the installer offers to start the Android SDK Manager. 一旦工具安装,安装程序提供了启动Android SDK经理。Start it and continue with the installation guide by

clicking the Next link on the right.启动它并继续安装指南通过点击右边的下一个链接。

Other platforms其他平台

Adding Platforms and Packages添加平台和包

Previous以前Next下一个

The Android SDK separates tools, platforms, and other components into packages you can

download using the Android SDK Manager. Android SDK将工具、平台和其他组件包你可以下载使用Android SDK经理。The original SDK package you've downloaded includes only the

SDK Tools. 原始SDK包你已经下载仅包括SDK工具。To develop an Android app, you also

need to download at least one Android platform and the latest SDK Platform-tools.开发Android应用程序,您还需要下载至少一个Android平台和最新SDK平台工具。

You can update and install SDK packages at any time using the Android SDK Manager.你可以更新和安装SDK包在任何时候使用Android SDK经理。

If you've used the Windows installer to install the SDK tools, you should already have the

Android SDK Manager open. 如果你使用Windows安装程序来安装SDK工具,您应该已经有了Android SDK管理器打开。Otherwise, you can launch the Android SDK Manager in one

of the following ways:否则,您可以启动Android SDK经理在以下几个方面:

On Windows, double-click the在Windows上,双击 SDK e at the root of the

Android SDK directory.文件的根目录Android SDK。

On Mac or Linux, open a terminal and navigate to the在Mac或Linux,打开终端并导航到

tools/directory in the Android SDK, then executeAndroid SDK目录中,然后执行 android

sdk.

When you open the Android SDK Manager, it automatically selects a set of recommended

packages. 当你打开Android SDK管理器,它会自动选择一组推荐的软件包。Simply click

Install to install the recommended packages. 简单的点击安装包安装建议。The Android SDK

Manager installs the selected packages into your Android SDK environment. Android SDK管理器安装选定包进你的Android SDK环境。The following sections describe some of the

available SDK packages and more about which ones we recommend you install.以下部分描述一些可用的SDK包和更多关于哪些我们建议您安装。

Once you have installed your packages, continue to the next page.一旦你安装您的软件包,继续下一个页面。

Figure 1.图1。The Android SDK Manager shows the SDK packages that are available, already

installed, or for which an update is d SDK管理器显示了SDK包是可用的,已经安装,或者一个更新是可用的。

Recommended Packages推荐的软件包

Here's an outlines of the packages required and those we recommend you use:这里的一个概述了需要的包和我们建议你使用:

SDK ToolsSDK工具

Required.要求。Your new SDK installation already has the latest version. 你的新SDK安装已经有了最新的版本。Make sure you keep this up to date.确保你把这个最新的。

SDK Platform-toolsSDK平台工具

Required.要求。You must install this package when you install the SDK for the first

time.您必须安装这个包安装SDK时第一次。

SDK PlatformSDK平台

Required.要求。You must download at least one platform into your environment so

you're able to compile your application. 你必须至少有一个平台下载到你的环境,因此你能够编译你的应用程序。In order to provide the best user experience on the latest

devices, we recommend that you use the latest platform version as your build target. 为了提供最好的用户体验最新的设备,我们建议您使用最新的平台版本作为您的构建目标。You'll still be able to run your app on older versions, but you must build against

the latest version in order to use new features when running on devices with the latest

version of Android.你仍然可以运行您的应用程序在较旧的版本,但您必须构建与最新版本为了使用新功能的设备上运行时最新版本的Android。

To get started, download the latest Android version, plus the lowest version you plan to

support (we recommend Android 2.2 for your lowest version).首先,下载最新的Android版本,再加上你的最低版本计划支持(我们推荐Android 2.2的最低版本)。

System Image系统映像

Recommended.推荐。Although you might have one or more Android-powered devices

on which to test your app, it's unlikely you have a device for every version of Android

your app supports. 尽管您可能有一个或更多的安卓设备上测试您的应用程序的时候,你似乎不会有一个装置,每一个版本的Android应用程序支持。It's a good practice

to download system images for all versions of Android your app supports and test your

app running on them with the这是一个很好的实���系统映像下载所有版本的Android应用程序支持和测试你的应用程序运行在它们与Android emulatorAndroid模拟器.

Android SupportAndroid支持

Recommended.推荐。Includes a static library that allows you to use some of the latest

Android APIs (such as包括一个静态库,允许您使用一些最新的Android api(如fragments碎片, plus others not included in the framework at all) on devices running a

platform version as old as Android 1.6. 和其他不包含在框架在所有设备上运行一个平台)Android 1.6版本一样古老。All of the activity templates available when creating

a new project with the所有的活动模板可以在创建新项目ADT PluginADT插件require this. 需要这个。For more information, read要了解更多信息,阅读Support

Library支持库.

SDK SamplesSDK样本

Recommended.推荐。The samples give you source code that you can use to learn about

Android, load as a project and run, or reuse in your own app. Note that multiple samples

packages are available — one for each Android platform version. 样品给您的源代码,您可以使用它来了解Android、负载作为一个项目并运行,或者在您自己的应用程序重用。注意,多个样品可用的包——一个用于每个Android平台的版本。When you are

choosing a samples package to download, select the one whose API Level matches the

API Level of the Android platform that you plan to use.当你选择一个样品包下载,选择一个API级别比赛的API级别的Android平台,你计划使用。

Tip:提示:For easy access to the SDK tools from a command line, add the location of the SDK's方便存取SDK工具从命令行,添加位置的SDK的 tools/and和 platform-toolsto your你 PATHenvironment variable.环境变量。

安装Eclipse插件

Previous以前Next下一个

Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT).

Android提供了一个定制插件的Eclipse IDE,叫做Android开发工具(ADT)。This plugin is

designed to give you a powerful, integrated environment in which to develop Android apps. 这个插件是为了给你一个强大的、集成的环境中开发Android应用程序。It extends the

capabilities of Eclipse to let you quickly set up new Android projects, build an app UI, debug

your app, and export signed (or unsigned) app packages (APKs) for distribution.它扩展了Eclipse功能的让你快速建立新的Android项目,构建一个应用程序UI,调试您的应用程序,和出口签署了(或无符号)应用程序包(APKs)的分布。

If you will be developing in Eclipse with the ADT Plugin, first make sure that you have a

suitable version of Eclipse installed on your computer as described by the如果你将在Eclipse中开发与ADT插件,首先确保你有一个适当版本的Eclipse安装在您的计算机上所描述的那样system requirements系统需求.

If you need to install Eclipse, you can download it from如果你需要安装Eclipse,您可以下载它/downloads//downloads/. 。We recommend the

"Eclipse Classic" version. 我们建议“Eclipse经典”版本。Otherwise, you should use a Java or

RCP version of Eclipse.否则,您应该使用一个Java或Eclipse RCP版。

Note:注意:If you prefer to work in a different IDE, you do not need to install Eclipse or ADT.

如果你更喜欢的工作在一个不同的IDE,您不需要安装Eclipse或ADT。Instead, you can

directly use the SDK tools to build and debug your application. 相反,您可以直接使用SDK工具来构建和调试应用程序。So if you're not using Eclipse, continue to the next page by clicking

the Next link on the right.所以,如果你不使用Eclipse,继续下一个页面点击右边的下一个链接。

Download the ADT Plugin下载ADT插件

1. Start Eclipse, then select Help > Install New Software.启动Eclipse,然后选择帮助>安装新的软件。

2. Click Add, in the top-right corner.单击Add,在右上角。

3. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the

following URL for the Location:在Add Repository对话框出现,输入“ADT插件”的名称和下面的URL位置:

/android/eclipse/

4. Click OK.单击OK。

If you have trouble acquiring the plugin, try using "http" in the Location URL, instead

of "https" (https is preferred for security reasons).如果你有麻烦获得插件,试着用“http”,相反的位置URL“https”(https优先出于安全原因)。

5. In the Available Software dialog, select the checkbox next to Developer Tools and click

Next.在可用的软件的对话框中,选择复选框来开发工具,然后单击next。

6. In the next window, you'll see a list of the tools to be downloaded. 在下一个窗口中,您将看到一个列表的工具下载。Click Next.单击Next。

7. Read and accept the license agreements, then click Finish.阅读并接受许可协议,然后点击Finish。

If you get a security warning saying that the authenticity or validity of the software can't

be established, click OK.如果你得到一个安全警告称真实性或者有效的软件不能被建立,单击OK。

8. When the installation completes, restart Eclipse.当安装完成后,重新启动Eclipse。

Configure the ADT Plugin配置ADT插件

Once Eclipse restarts, you must specify the location of your Android SDK directory:一旦重启Eclipse,您必须指定位置你的Android SDK目录:

1. In the "Welcome to Android Development" window that appears, select Use existing

SDKs.在“欢迎来到Android开发“窗口出现,选择使用现有的sdk。

2. Browse and select the location of the Android SDK directory you recently downloaded.浏览并选择Android SDK的位置最近下��目录。

3. Click Next.单击Next。

If you haven't encountered any errors, you're done setting up ADT and can continue to如果你还没有遇到任何错误,您就完成了设置ADT和可以继续Next Steps下一个步骤.

Updating the ADT Plugin更新ADT插件

From time to time, a new revision of the ADT Plugin becomes available, with new features and

bug fixes. 不时地,一个新修订的ADT插件可用,新特性和bug修复。Generally, when a new

revision of ADT is available, you should update to it as soon as convenient.一般来说,当一个新修订的ADT可用,您应该更新,而且很快方便。

In some cases, a new revision of ADT will have a dependency on a specific revision of the

Android SDK Tools. 在某些情况下,一个新的修订ADT将依赖于一个特定修订的Android

SDK工具。If such dependencies exist, you will need to update the SDK Tools package of the

SDK after installing the new revision of ADT. 如果这种依赖关系存在,您将需要更新SDK工具包装SDK安装后新修订的ADT。To update the SDK Tools package, use the Android SDK

Manager, as described in更新SDK工具包,使用Android SDK管理器中描述的那样Exploring

the SDK探索SDK.

To learn about new features of each ADT revision and also any dependencies on the SDK Tools,

see the listings in the了解新特性的每个ADT修订和任何依赖SDK工具,请参见清单的Revisions修正section. 部分。To determine the version currently installed, open the Eclipse

Installed Software window using Help > Software Updates and refer to the version listed for

"Android Development Tools".确定当前安装的版本,打开Eclipse安装的软件窗口使用帮助>软件更新和参考版本上市“Android开发工具”。

Follow the steps below to check whether an update is available and, if so, to install it.按照以下步骤检查是否一个更新是可用的,如果是,安装它。

1. Select Help > Check for Updates.选择帮助>检查更新。

If there are no updates available, a dialog will say so and you're done.如果没有可用的更新,一个对话框会这么说,您已经完成了。

2. If there are updates available, select Android DDMS, Android Development Tools, and

Android Hierarchy Viewer, then click Next.如果有更新可用,选择Android摘要,Android开发工具,和Android层次查看器,然后单击Next。

3. In the Update Details dialog, click Next.在更新细节对话框中,单击Next。

4. Read and accept the license agreement and then click Finish. 阅读并接受许可协议,然后点击Finish。This will download and install the latest version of Android DDMS and

Android Development Tools.这将下载并安装最新版本的Android摘要和Android的开发工具。

5. Restart Eclipse.重新启动Eclipse。

If you encounter problems during the update, remove the existing ADT plugin from Eclipse,

then perform a fresh installation, using the instructions for如果你遇到问题在更新、删除现有的ADT插件从Eclipse,然后执行一个新的安装,使用说明Installing the ADT Plugin安装ADT插件.

Troubleshooting故障诊断

If you are having trouble downloading the ADT plugin after following the steps above, here are

some suggestions:如果你遇到困难下载ADT插件根据上述步骤后,这里有一些建议:

If Eclipse can not find the remote update site containing the ADT plugin, try changing the

remote site URL to use http, rather than https. 如果Eclipse找不到远程更新站点包含ADT插件,尝试改变远程站点URL使用http,而不是https。That is, set the Location for the remote site

to:这是,设置位置对远程网站:

/android/eclipse/

If you are behind a firewall (such as a corporate firewall), make sure that you have properly

configured your proxy settings in Eclipse. 如果你是在一个防火墙后面(如企业防火墙),确保您已经正确配置了您的代理设置在Eclipse中。In Eclipse, you can configure proxy

information from the main Eclipse menu in Window (on Mac OS X, Eclipse) > Preferences >

General > Network Connections.在Eclipse中,您可以配置代理信息从主Eclipse菜单窗口(在Mac OS X上,Eclipse)> Preferences >一般>网络连接。

If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you

can download the ADT zip file to your local machine and manually install it:如果你仍然无法使用Eclipse ADT插件下载作为远程更新站点,您可以下载zip文件的ADT到您的本地机器上并手动安装:

1. Download the ADT Plugin zip file (do not unpack it):下载ADT插件zip文件(不要将它解):

Package包 Size大小 MD5 ChecksumMD5校验和

869a536b1c56d0cd920ed9ae259ae619869

a536b1c56d0cd920ed9ae259ae619

12390954

bytes1239095420 0 3 zip字节

2. Start Eclipse, then select Help > Install New Software.启动Eclipse,然后选择帮助>安装新的软件。

3. Click Add, in the top-right corner.单击Add,在右上角。

4. In the Add Repository dialog, click Archive.在Add Repository对话框中,点击存档。

5. Select the downloaded ADT-20.0.3.选择下载的adt 20 0 3。zip file and click 文件,并单击OK。

6. Enter "ADT Plugin" for the name and click OK.输入“ADT插件”的名称并单击OK。

7. In the Available Software dialog, select the checkbox next to Developer Tools and click

Next.在可用的软件的对话框中,选择复选框来开发工具,然后单击next。

8. In the next window, you'll see a list of the tools to be downloaded. 在下一个窗口中,您将看到一个列表的工具下载。Click Next.单击Next。

9. Read and accept the license agreements, then click Finish.阅读并接受许可协议,然后点击Finish。

If you get a security warning saying that the authenticity or validity of the software can't

be established, click OK.如果你得到一个安全警告称真实性或者有效的软件不能被建立,单击OK。

10. When the installation completes, restart Eclipse.当安装完成后,重新启动Eclipse。

To update your plugin once you've installed using the zip file, you will have to follow these

steps again instead of the default update instructions.更新你的插件一旦安装使用zip文件,你将不得不遵循这些步骤,而不是默认的更新指令。

Other install errors其他安装错误

Note that there are features of ADT that require some optional Eclipse packages (for example,

WST). 请注意,有特点,需要一些可选的Eclipse ADT包(例如,WST)。If you encounter an error

when installing ADT, your Eclipse installion might not include these packages. 如果你遇到一个错误当安装ADT,您的Eclipse安装可能不包括这些包。For information about how to

quickly add the necessary packages to your Eclipse installation, see the troubleshooting topic了解如何快速添加必要的包到您的Eclipse安装,请参阅故障排除的话题ADT Installation Error:

"requires plug-in "ADT安装错误:“需要插件org eclipse wst sse ui”.

For Linux users对于Linux用户

If you encounter this error when installing the ADT Plugin for Eclipse:如果你遇到这种错误在安装Eclipse ADT插件:

An error occurred during provisioning.

Cannot connect to keystore.

JKS

...……then your development machine lacks a suitable Java VM. 然后您的开发机器缺乏合适的Java VM。Installing Sun Java 6 will resolve this issue and you can then reinstall the ADT

Plugin.安装Sun Java 6将解决这个问题,然后您可以重新安装ADT插件。

Next Steps下一个步骤

Previous以前Next下一个

Now that you've installed the Android SDK, here are are a few ways to learn Android and start

developing:现在您已经安装Android SDK,这里有几个方法去学习Android并开始开发:

Start coding开始编码

Follow the training class for按照培训类Building Your First App构建您的第一个应用程序.

This class is an essential first step for new Android developers.这个类是很重要的第一步对新Android开发者。

It gives you step by step instructions for building a simple app. You’ll learn how to create an

Android project and run a debuggable version of the app. You'll also learn some fundamentals

of Android app design, including how to build a simple user interface and handle user input.它给你一步一步的指导来构建一个简单的应用程序,您将学习如何创建一个Android项目并运行��个debuggable版本的应用程序,您还将学习一些基础的Android应用程序的设计,包括如何构建一个简单的用户界面和处理用户输入。

Learn how to design your app学习如何设计你的应用程序

Learn the best practices for Android design and user experience by reading the Android学习的最佳实践为Android设计和用户体验所读的AndroidDesign设计guidelines.指导方针。

Read up on the API framework阅读API框架

Start reading about fundamental framework topics in the collection of开始阅读有关基本框架主题收集的API GuidesAPI指南.

Browse the API specifications in the浏览API规范Reference参考.

Explore the development tools探索开发工具

Learn about developing an app with the Android Developer Tools plugin for Eclipse and other

tools from the了解开发一个应用程序与Android开发者工具插件的Eclipse和其他的工具Workflow工作流.

Explore some code探索一些代码

Browse the sample apps available from the Android SDK Manager. 浏览示例应用可以从Android SDK经理。You'll find them in你会发现它们/samples/< sdk > / samples

//<平台版本> /.

Exploring the SDK探索SDK

Previous以前Next下一个

The Android SDK is composed of modular packages that you can download separately using the

Android SDK Manager. Android SDK是由模块化包,您可以单独下载使用Android SDK经理。For example, when the SDK Tools are updated or a new version of the Android platform is

released, you can use the SDK Manager to quickly download them to your environment. 例如,当SDK工具更新或者Android平台的新版本发布时,您可以使用SDK经理快速下载到您的环境。Simply follow the procedures described in简单地遵循以下的步骤中描述的Adding

Platforms and Packages添加平台和包.

There are several different packages available for the Android SDK. 有几种不同的包可供Android SDK。The table below describes most of the available packages and where they're

located once you download them.下面的表描述了大部分的可用的软件包,它们位于一旦你下载它们。

Available Packages可用包

Package包 Description描述 File Location文件位置

Contains tools for

debugging and

testing, plus other

utilities that are

required to

develop an app. If

you've just

installed the SDK

starter package,

then you already

have the latest

version of this

ToolsSDKpackage. 包含工/tools/

具来调试和测试,再加上其他实用程序,需要开发一个应用程序。如果你刚刚安装SDK起动器包,那么你已经拥有这个包的最新版本。Make sure you

keep this up to

date.确保你把这个最新的。

SDK

工具Contains

platform-dependent tools for

developing and

debugging your

application. 包含SDK

用于开发和调试Platform-toolsSD工具与平台相关/platform-tools/

K平台工具 的应用程序。These tools

support the latest

features of the

Android platform

and are typically

updated only when

a new platform

becomes available.

这些工具支持最新的Android平台的特点,通常只有当一个新平台的更新可用。These

tools are always

backward

compatible with

older platforms,

but you must be

sure that you have

the latest version

of these tools

when you install a

new SDK

platform.这些工具总是向后兼容旧的平台,但你必须确保你有最新版本的这些工具,当你安装一个新的SDK平台。

An offline copy of

the latest

documentation for

Android

Documentation文the

/docs/

档 platform APIs.离线副本的最新文档对Android平台的api。

There's one SDK

Platform available

for each version of

Android. 有一个SDK平台可供每个版本的平/platforms//

Android。It

includes an它包括一个

SDK

PlatformSDK台

e

with a fully

compliant Android

library. 文件与一个完全兼容的Android库。In

order to build an

Android app, you

must specify an

SDK platform as

your build target.为了构建一个Android应用程序,您必须指定一个SDK平台作为您的构建目标。

Each platform

version offers one

or more different

system images

(such as for ARM

and x86). 每个平台版本提供了一个或多个不同的系统映像(比如臂和x86)。The

Android emulator

requires a system

image to operate.

Android模拟器需System Images系要一个操作系统/platforms//

统映像 映像。You should

always test your

app on the latest

version of Android

and using the

emulator with the

latest system

image is a good

way to do so.你应该总是测试您的应用程序的最新版本的Android和使用模拟器和最新的系统映像是一个好方法。

Sources for A copy of the

/sources/

Android SDK来Android platform

源为Android

source code that's

SDK useful for stepping

through the code

while debugging

your d平台的一个副本的源代码用于逐步调试代码,同时调试应用程序。

A collection of

sample apps that

demonstrate a

variety of the

platform APIs. 一组示例应用程序演示各种平台的api。These are a

great resource to

browse Android

app code. 这些都Samples for SDK/platforms//sample是一个巨大的资样本SDKs/

源来浏览Android应用程序代码。The API Demos

app in particular

provides a huge

number of small

demos you should

演示应用程序尤其提供了大量的小演示你应该探索。

An SDK add-on

that provides both

a platform you can

use to develop an

app using special

Google APIs谷歌Google APIs and a

/add-ons/

apisystem image for

the emulator so

you can test your

app using the

Google

Android

SupportAndroid支持扩展,同时提供了一个平台,你可以使用开发一个应用程序使用特殊的谷歌api和一个系统映像模拟器,这样你可以测试你的应用程序使用谷歌api。

A static library

you can include in

your app sources

in order to use

powerful APIs that

aren't available in

the standard

platform. 一个静态库可以包括在应用程序源为了使用强大的api没有可用的标准平台。For example,

the support library

contains versions

of the例如,支持库包含版本的

Fragmentclass

/extras/android/support/

that's compatible

with Android 1.6

and higher (the

class was

originally

introduced in

Android 3.0) and

the类的兼容Android 1.6和更高版本(类最初引入Android 3.0)和

ViewPagerAPIs

that allow you to

easily build a

side-swipeable

,使您可以轻松地构建一个

side-swipeable

UI。

Provides the static

libraries and

samples that allow

you to integrate

billing services in

Google Play

your app with

Billing谷歌玩计/extras/google/

Google Play.提供费了静态库和示例,使您可���在您的应用程序集成计费服务与谷歌玩。

Provides the static

libraries and

samples that allow

you to perform

license

verification for

Google Play

your app when

Licensing谷歌玩/extras/google/

distributing with

许可Google Play.提供了静态库和示例,使您可以为您的应用程序执行的许可证验证与谷歌传播玩。

The above table is not comprehensive and you can上面的表是不全面的,你可以add new sites添加新网站to download additional packages from third-parties.下载额外的包从第三方。

In some cases, an SDK package may require a specific minimum revision of another package or

SDK tool. 在某些情况下,一个SDK包可能需要一个特定的最低版本的另一个包或SDK工具。For example, there may be a dependency between the ADT Plugin for Eclipse and the SDK

Tools package. 例如,可能有一个依赖关系为Eclipse ADT插件和SDK工具包。When you

install the SDK Tools package, you should also upgrade to the required version of ADT (if you

are developing in Eclipse). 当你安装SDK工具包,您还应该升级到所需的版本的ADT(如果您正在开发的Eclipse)。In this case, the major version number for your ADT plugin should

always match the revision number of your SDK Tools (for example, ADT 8.在这种情况下,主版本号为你的ADT插件应该匹配的修订号你的SDK工具(例如,ADT 8。x requires SDK

Tools r8).x需要SDK工具r8)。

The development tools will notify you with debug warnings if there is dependency that you need

to address. 开发工具将通知您调试警告如果有依赖项,您需要处理。The Android SDK

Manager also enforces dependencies by requiring that you download any packages that are

needed by those you have d SDK经理也执行依赖通过要求你下载任何包需要的那些你选择。

Adding New Sites添加新网站

By default, Available Packages displays packages available from the Android Repository and

Third party Add-ons. 默认情况下,可用包显示包可以从Android存储库和第三方插件。You

can add other sites that host their own Android SDK add-ons, then download the SDK add-ons

from those sites.您可以添加其他网站,拥有自己的Android SDK附加组件,然后下载SDK外接程序从这些网站。

For example, a mobile carrier or device manufacturer might offer additional API libraries that

are supported by their own Android-powered devices. 例如,一个移动运营商和设备制造商可能会提供额外的API库,支持自己的安卓设备。In order to develop using their libraries, you

must install their Android SDK add-on, if it's not already available under Third party Add-ons.为了开发利用他们的库,您必须安装Android SDK插件,如果它不是已经可以在第三方插件。

If a carrier or device manufacturer has hosted an SDK add-on repository file on their web site,

follow these steps to add their site to the Android SDK Manager:如果运营商或者设备制造商举办了一个SDK附加存储库文件在他们的网站上,执行以下步骤,添加他们的网站,Android

SDK经理:

1. Select Available Packages in the left panel.选择左面板中的可用包。

2. Click Add Add-on Site and enter the URL of the单击Add并输入URL附加组件网站的 e. 文件。Click OK.单击OK。

Any SDK packages available from the site will now be listed under a new item named User

Add-ons.任何SDK软件包可以从现在起,该网站会被列在一个新项目命名用户附加组件。

Troubleshooting故障诊断

Problems connecting to the SDK repositorySDK库连接有问题

If you are using the Android SDK Manager to download packages and are encountering

connection problems, try connecting over http, rather than https. 如果您使用的是Android

SDK管理器来下载包和遇到连接问题,尝试通过http连接,而不是https。To switch the

protocol used by the Android SDK Manager, follow these steps:使用的协议转换由Android

SDK经理,遵循这些步骤:

1. With the Android SDK Manager window open, select "Settings" in the left pane.与Android SDK管理器窗口打开时,选择“设置”在左边的面板。

2. On the right, in the "Misc" section, check the checkbox labeled "Force ... 在右边,在“Misc”部分,检查复选框标记为“力..。sources to be fetched using

..."要获取来源使用..。”

3. Click Save & Apply.单击Save &应用。

Android开发者工具

In this document在本文档

1. SDK Tools IntegrationSDK工具集成

2. Code Editors代���编辑器

1. Resource linking enhancements资源连接增强

3. Graphical Layout Editor图形布局编辑

1. Canvas and outline view帆布和大纲视图

2. Palette调色板

3. Configuration chooser配置选择器

4. Layout Factoring Support布局保理支持

Related videos相关视频

1. Android Developer Tools Google I/O SessionAndroid开发者工具谷歌I / O会议

See also参见

1. Android Tools change blogAndroid工具改变博客

ADT (Android Developer Tools) is a plugin for Eclipse that provides a suite of tools that are

integrated with the Eclipse IDE. ADT(Android开发者工具)是一个Eclipse插件,它提供了一组工具,集成了Eclipse IDE。It offers you access to many features that help you develop Android

applications quickly. 它提供了您访问许多特性,可以帮助您快速开发Android应用程序。ADT provides GUI access to many of the command line SDK tools as well as a UI design tool

for rapid prototyping, designing, and building of your application's user 提供的GUI访问许多命令行SDK工具以及一个UI设计工具,用于快速原型、设计和构建的应用程序的用户界面。

Because ADT is a plugin for Eclipse, you get the functionality of a well-established IDE, along

with Android-specific features that are bundled with ADT. 因为是为Eclipse ADT插件,你得到的功能完善的IDE,随着android特定功能附带ADT。The following describes important

features of Eclipse and ADT:下面描述了重要特性的Eclipse和ADT:

Integrated Android project creation, building, packaging, installation, and debugging集成的Android项目创建、建筑、包装、安装和调试

ADT integrates many development workflow tasks into Eclipse, making it easy for you

to rapidly develop and test your Android applications.许多开发工作流任务ADT集成到Eclipse中,使你更容易快速开发和测试你的Android应用程序。

SDK Tools integrationSDK工具集成

Many of the许多SDK toolsSDK工具are integrated into Eclipse's menus, perspectives,

or as a part of background processes ran by ADT.集成到Eclipse的菜单,视角,或作为一个部分由ADT的后台进程运行。

Java programming language and XML editorsJava编程语言和XML编辑器

The Java programming language editor contains common IDE features such as compile

time syntax checking, auto-completion, and integrated documentation for the Android

framework APIs. Java编程语言编辑器包含常见的IDE特性,比如编译时语法检查、自动完成和集成为Android框架api的文档。ADT also provides custom XML editors

that let you edit Android-specific XML files in a form-based UI. ADT还提供了自定义的XML编辑器,让您编辑android特定XML文件在一个基于表单的UI。A graphical

layout editor lets you design user interfaces with a drag and drop interface.一个图形布局设计用户界面编辑器允许你用一个拖放界面。

Integrated documentation for Android framework APIs集成为Android框架api的文档

You can access documentation by hovering over classes, methods, or variables.您可以通过将鼠标悬停在访问文档类、方法或变量。

You can find the most up-to-date and more detailed information about changes and new features

on the你可以找到最新的和更详细的信息和新特性的变化Recent Changes最近的变化page

at the Android Tools Project site.在页面的Android工具项目网站。

SDK Tools IntegrationSDK工具集成

Need help designing icons?需要帮助设计图标?

The这个Android Asset StudioAndroid资产工作室is a web-based tool that lets you generate

icons from existing images, clipart, or text. 是一个基于web的工具,可以让你产生图标从现有的图像,剪纸艺术,或文本。It also generates the icons with different DPIs for different screen

sizes and types.它还生成与不同的DPIs的图标为不同的屏幕大小和类型。

Many of the tools that you can start or run from the command line are integrated into ADT. 许多工具,你可以开始或从命令行运行集成到ADT。They include:它们包括:

TraceviewTraceview: Allows you to profile your program's execution (Window > Open

Perspective > Traceview).:允许您配置文件程序的执行(窗口打开的透视图>> Traceview)。

androidAndroid: Provides access to the Android SDK Manager and AVD Manager. :提供访问

Android SDK经理和AVD管理器。Other其他 androidfeatures such as creating or updating

projects (application and library) are integrated throughout the Eclipse IDE.特性,比如创建或更新项目(应用程序和库)在整个Eclipse IDE集成。

Hierarchy Viewer层次查看器: Allows you to visualize your application's view hierarchy to find

inefficiencies (Window > Open Perspective > Hierarchy Viewer).:允许您可视化应用程序的视图层次发现低效(窗口打开的透视图>>层次查看器)。

Pixel Perfect像素完美: Allows you to closely examine your UI to help with designing and

building. :允许您仔细检查你的UI,帮助设计和建造。(Window > Open Perspective > Pixel

Perfect).(窗口打开的透视图>>像素完美)。

DDMS摘要: Provides debugging features including: screen capturing, thread and heap

information, and logcat (Window > Open Perspective > DDMS).:提供了调试功能,包括:屏幕捕获、线程和堆信息,和logcat(窗口打开的透视图>>摘要)。

adbadb: Provides access to a device from your development system. :提供了访问设备从您的开发系统。Some features of一些特性的 adbare integrated into ADT such as project

installation (Eclipse run menu), file transfer, device enumeration, and logcat (DDMS). 集成到ADT如项目安装(Eclipse运行菜单),文件传输,设备枚举和logcat(摘要)。You must access the

more advanced features of你必须访问的高级特性 adb, such as shell commands, from the

command line.,如shell命令,从命令行。

ProGuard混淆器: Allows code obfuscation, shrinking, and optimization. :允许代码混淆、缩小和优化。ADT integrates ProGuard as part of the build, if youADT集混淆器作为该构建的一部分,如果你enable it启用它.

Code Editors代码编辑器

In addition to Eclipse's standard editor features, ADT provides custom XML editors to help you

create and edit Android manifests, resources, menus, and layouts in a form-based or graphical

mode. 除了Eclipse的标准编辑功能,ADT提供定制的XML编辑器可以帮助您创建和编辑Android体现、资源、菜单和一个基于表单的布局或图形模式。Double-clicking on an XML

file in Eclipse's package explorer opens the appropriate XML editor.双击一个XML文件在Eclipse的package explorer打开适当的XML编辑器。

Google I/O Session Video谷歌I / O会议视频

View the segment on the查看的片段XML editorsXML编辑器for more information.更多信息。

Note:注意:You can edit Android-specific XML files (such as a layout or manifest) in both a

graphical mode and also an XML markup mode. 您可以编辑android特定的XML文件(如布局或清单)在两个图形模式和XML标记模式。You can switch between these modes with the

pair of tabs at the bottom of each custom XML editor.您可以切换这些模式与一对选项卡底部的每个定制XML编辑器。

In addition, some special file types that don't have custom editors, such as drawables,

animations, and color files offer editing enhancements such as XML tag completion.此外,一些特殊的文件类型,没有自定义编辑器,如画板,动画和颜色文件提供编辑的改进,如XML标记完成。

ADT provides the following custom, form-based XML editors:ADT提供了以下自定义,基于表单的XML编辑器:

Graphical Layout Editor图形布局编辑

Edit and design your XML layout files with a drag and drop interface. 编辑和设计XML布局文件拖拽界面。The layout editor renders your interface as well, offering you

a preview as you design your layouts. 编辑你的界面布局呈现,给你一个预览你设计你的布局。This editor is invoked when you open an XML file with a view declared

(usually declared in这个编辑器调用的是当你打开一个XML文件,其中一个视图宣布(通常中声明 res/layout. 。For more information, see有关更多信息,请参见Graphical Layout Editor图形布局编辑.

Android Manifest EditorAndroid Manifest编辑器

Edit Android manifests with a simple graphical interface. 编辑Android体现用一个简单的图形界面。This editor is invoked when you open an这个编辑器是当你打开一个调用 e.文件。

Menu Editor菜单编辑器

Edit menu groups and items with a simple graphical interface. 编辑菜单组和项目用一个简单的图形界面。This editor is invoked when you open an XML file with a这个编辑器调用的是当你打开一个XML文件,其中一个

declared (usually located in

the宣布(通常位于 res/menufolder).文件夹)。

Resources Editor资源编辑器

Edit resources with a simple graphical interface. 编辑资源用一个简单的图形界面。This editor is invoked when you open an XML file with a这个编辑器调用的是当你打开一个XML文件,其中一个tag declared.标记声明。

XML Resources EditorXML资源编辑器

Edit XML resources with a simple graphical interface. 编辑XML资源与一个简单的图形界面。This editor is invoked when you open an XML file.这个编辑器调用的是当你打开一个XML文件。

Resource linking enhancements资源连接增强

In addition to the normal code editing features of Eclipse, ADT provides enhancements to the

Android development experience that allow you to quickly jump to declarations of various types

of resources such as strings or layout files. 除了正常的代码编辑功能的Eclipse,ADT提供增强Android开发经验,允许您快速跳转到声明的各种类型的资源,如字符串或布局文件。You

can access these enhancements by holding down the control key and clicking on the following

items:你可以访问这些增强功能,通过按住ctrl键并单击下列事项:

A resource identifier, such as资源标识符,如 1, jumps to the XML definition of

the view.,跳转到XML定义的视图。

A declaration in the一个声明在 le, such as文件,例如 public static final

int Button01=0x7f050000", jumps to the corresponding XML definition.,跳跃到相应的XML定义。

An activity or service definition in your manifest, such as一个活动或服务定义在清单,例如, jumps to the corresponding Java class. ,跳跃到相应的Java类。You can jump from an activity definition (or service definition) into the

corresponding Java class.你能跳从一个活动的定义(或服务定义)为相应的Java类。

You can jump to any value definition (e.g.您可以跳转到任何值定义(如。 @string:foo),

regardless of which XML file "foo" is defined in.),而不管哪种XML文件中定义的“foo”。

Any file-based declaration, such as任何基于文件的声明,如 @layout/bar, opens the file.,打开文件。

Non-XML resources, such as非xml资源,如 @drawable/icon, launches Eclipse's default

application for the given file type, which in this case is an image.,启动Eclipse的默认应用程序对于给定的文件类型,在本例中是一个图像。

@androidnamespace resources opens the resources found in the SDK install area.名称空间资源打开资源发现在SDK安装区域。

Custom views in XML layouts, such as自定义视图在XML布局,如<>, or,或者)

jump to the corresponding custom view classes.)跳转到相应的自定义视图类。

An XML attribute such as一个XML属性如 @android:string/okor或

Java code opens the file that declares the strings. 在Java代码中打开文件,声明了字符串。The XML tab opens when doing this, not the form-based 标签打开当这样做,而不是基于表单的编辑器。

Graphical Layout Editor图形布局编辑

ADT provides many features to allow you to design and build your application's user interface.

ADT提供了很多特性来允许您设计和构建应用程序的用户界面。Many of these features are

in the graphical layout editor, which you can access by opening one of your application's XML

layout files in Eclipse.这些特性中有很多在图形化布局编辑器,你可以通过打开一个应用程序的XML布局文件在Eclipse中。

The graphical layout editor is the main screen that you use to visually design and build your UI.

图形布局编辑器是主屏幕,您可以利用视觉设计和构建UI。It is split up into the following

parts:它是分成以下部分:

Canvas帆布

In the middle of the editor is the canvas. 在中间的编辑器画布上。It provides the

rendered view of your layout and supports dragging and dropping of UI widgets directly

from the palette. 它提供了呈现的视图的布局和支持拖拽的UI小部件直接从调色板。You can select the platform version used to render the items in the canvas. 你可以选择平台版本用于呈现在画布上的物品。Each platform version has its own look and feel,

which might be the similar to or radically different from another platform version. 每个平台版本都有它自己的外观和感觉,这可能是类似的,或从另一个完全不同的平台版本。The canvas renders the appropriate look and feel for the currently selected

platform version. 画布上呈现适当的外观和感觉,当前选择的平台版本。This

platform version does not need to be the same as the version that your application

targets.这个平台的版本不需要同样的版本,您的应用程序的目标。

The canvas also provides context-sensitive actions in the layout actions bar, such as

adjusting layout margins and orientation. 画布上还提供了上下文敏感的行动在布局动作栏,如调整布局利润率和取向。The layout actions bar displays available actions

depending on the selected UI element in the canvas.布局动作栏显示的可用操作取决于选择的UI元素在画布上。

Outline大纲

On the right side of the editor is the outline view. 编辑器的右侧是outline视图。It

displays a hierarchical view of your layout where you can do things such as reorder of

views. 它显示了一个层次结构视图,其中你的布局,你可以做的事情包括重新排序的观点。The outline view exposes similar functionality as the canvas but displays your

layout in an ordered list instead of a rendered e视图公开类似的功能作为画布但显示你的布局在有序列表,而不是一个渲染预览。

Palette调色板

On the left side of the editor is the palette. 在编辑器的左侧是调色板。It provides a set

of widgets that you can drag onto the canvas. 它提供了一组小部件,您可以拖动到画布上。The palette shows rendered previews of the widgets for easy lookup of desired UI

widgets.面板显示渲染预览的小部件,以便于查找所需的UI小部件。

Configuration Chooser配置选择器

At the top of the editor is the configuration chooser. 在编辑器顶部是配置选择器。It

provides options to change a layout's rendering mode or screen type.它提供了选项来更改布局的渲染模式或屏幕类型。

Figure 1.图1。Graphical layout editor图形布局编辑

Canvas and outline view帆布和大纲视图

Google I/O Session Video谷歌I / O会议视频

View the segment on the查看的片段canvas and outline view帆布和大纲视图and the和layout

actions bar布局动作栏for more information.更多信息。

The canvas is the area where you can drag and drop UI widgets from the palette to design your

layout. 画布是地方你可以拖拽UI小部件从调色板来设计你的布局。The canvas offers a

rendered preview of your layout depending on factors such as the selected platform version,

screen orientation, and currently selected theme that you specify in the画布上提供一个渲染预览你的布局取决于因素如选择的平台版本,屏幕的方向,和当前选择的主题,您指定的configuration chooser配置选择器. 。You can also drag and drop items into the outline view,

which displays your layout in a hierarchical list. 您还可以拖放物品到outline视图,它显示你的布局在分级列表。The outline view exposes much of the same functionality as the canvas but

offers another method of organization that is beneficial for ordering and quickly selecting items.

outline视图公开了同样的功能,但提供了另一种方法的帆布组织,有利于排序和快速选择项。When you right-click a specific item in the canvas or outline view, you can access a

context-sensitive menu that lets you modify the following attributes of the layout or view:当您右键单击一个特定的项目在帆布或大纲视图,您可以访问一个上下文敏感的菜单,可以让你修改以下属性的布局或查看:

View and layout properties视图和布局属性

When you right-click a view or layout in the canvas or outline view, it brings up a

context-sensitive menu that lets you set things such as:当您右键单击一个视图或布局在帆布或大纲视图,它带来了一个上下文敏感的菜单,让你把事情如:

ID of the view or layoutID的视图或布局

Text of the view文本的视图

Layout width布局宽度

Layout height布局高度

Properties such as alpha or clickable属性如α或可点击的

Animation preview and creation动画预览和创造

If your layout or view is animated, you can preview the animation directly in the canvas

(when you select Android 3.0 or later as the platform version in the configuration

chooser). 如果你的布局或视图是动画,您可以预览动画直接在画布上(当您选择Android 3.0或更高版本的平台在配置选择器)。Right-click an item in the canvas and

select Play Animation.右键单击一个项目在画布,并选择玩动画。If animation is not

associated with item, an option is available in the menu to create one.如果动画不是与项目有关,一个选项可以在菜单创建一个。

View the segment on the查看的片段animation features动画特性for more information.更多信息。

Extract as Include提取为包括

You can extract parts of a current layout into its own layout file, which you can then

include in any layout with a single line of XML. 你可以提取部分电流布局到其自己的布局文件,然后可以包括在任何布局与一行XML。See看到Layout Refactoring

Support布局重构支持for more information.更多信息。

Other canvas features其他帆布特性

The canvas has additional features not available in the outline view:画布上有额外的功能可能无法在outline视图:

Edit views with the layout actions bar: The context-sensitive layout actions bar allows you to

edit how a view is laid out in your UI. 编辑视图和布局动作栏:上下文敏感的布局动作栏允许您编辑视图是如何放置在你的UI。The available actions depend on the currently selected

view and its parent layout. 可用的操作取决于当前选择的视图和其母布局。Some common

actions include toggling the fill mode of the view and specifying margins. 一些常见的操作包括切换充填模式的视图和指定的利润率。For instance, if you select a例如,如果您选择一个

Buttonin a在一个 LinearLayout, you see actions related to the,你看到的行动有关

LinearLayout, such as a toggle to switch between horizontal and vertical layout, and a toggle to

control whether its children are aligned along their text baseline. ,比如一个开关切换水平和垂直布局和切换控制是否孩子们沿着他们的文本的基线对齐。You will also see toolbar actions

to control the individual layout attributes of the child, such as whether the child should stretch

out to match its parent's width and height, a dropdown action to set the child's layout gravity, a

button to open a margin editor, and a layout weight editor.您还将看到工具栏动作来控制个体布局属性的孩子,比如是否孩子应该伸出来匹配其父母的宽度和高度,一个下拉行动组孩子的布局重力,一个按钮来打开一个编辑器,和一个布局保证金。重量编辑器

Edit a nested layout in its current context: If you are editing a layout that includes another layout,

you can edit the included layout in the layout that included it.编辑一个嵌套的布局在其当前上下文:如果你正在编辑的布局,包括另一个布局,您可以编辑包含布局的布局,包括它。

Preview drag and drop location: When you drag and drop a UI widget onto the canvas, ruler

markers appear showing you the approximate location of the UI widget depending on the type

of layout, such as预览拖放的位置:当你拖拽一个UI小部件拖放到画布上,统治者标记显示你的大致位置的UI小部件根据类型的布局,如 RelativeLayoutor或 LinearLayout.

Preview animations: You can preview view and layout animations when you select Android 2.1

or later for the platform version in the configuration bar.预览动画:你可以预览视图和布局动画当您选择Android 2.1或更高版本的平台在配置酒吧。

Render layouts in real-time: Layouts are rendered as accurately as possible according to the

platform version, including the appropriate system and action bars.实时呈现布局:布局呈现尽可能准确地根据平台的版本,包括适当的系统和行动酒吧。

Support for fragments: Fragments can be rendered in the same screen as the layout that includes

the fragments.支持片段:片段可以在同一个屏幕上呈现的布局,包括片段。

Figure 2.图2。Canvas portion of the layout editor showing a rendered preview of an

applicationCanvas部分的布局编辑器显示呈现应用程序的预览

Figure 3.图3。Outline view showing current layout's structureOutline视图显示当前的布局结构

Palette调色板

Google I/O Session Video谷歌I / O会议视频

View the segment on the查看的片段palette调色板for more information.更多信息。

The palette contains the UI widgets that you can drag and drop onto the canvas and add to your

layout. palette包含UI小工具,你可以拖拽到画布上,并添加到你的布局。The pallete

categorizes the widgets and shows rendered previews for easier lookup. 这个面板中显示的窗口小部件呈现分类和预告片更容易查找。The main features of the palette include:调色板的主要特征包括:

Different modes of rendered previews include: icons only, icons and text, tiny previews, small

previews, and previews (rendered in real size). 不同的模式呈现的预览功能包括:图标只有、图标和文字,微小的预览,小的预览,和预览(呈现在真正的大小)。Previews are only available

for layouts rendered with the latest revisions of Android 2.1 (API Level 7) or later.预览只是用于布局呈现最新修订的Android 2.1(API Level 7)或之后。

Custom views in your project or library projects are added under custom views category.自定义视图在您的项目或库项目添加自定义视图类别下。

Arrange UI widgets alphabetically or by category.按字母顺序排列的UI部件或类别。

Figure 4.图4。Palette showing available UI widgets调色板显示可用的UI小部件

Configuration chooser配置选择器

Google I/O Session Video谷歌I / O会议视频

View the segment on the查看的片段configuration chooser配置选择器for more information.更多信息。

The configuration chooser allows you to create and configure different configurations of a

layout for different situations, such as one for landscape and one for portrait mode. 配置选择器允许您创建和配置不同的配置在不同情况下的布局,如一个用于景观和一个用于肖像模式。You can set the following options for each configuration of a layout:你可以设置以下选项为每个配置一个布局:

Screen type combo box: Predefined screen settings for common device configurations. 屏幕类型组合框:预定义的屏幕设置为常见的设备配置。You can also create your own by selecting

你还可以创建自己的自定义....选择

Screen orientation combo box: Portrait or Landscape screen orientation.屏幕的方向组合框:横向或纵向屏幕的方向。

Theme combo box: Predefined themes or a custom theme that you have created.主题组合框:预定义的主题或一个自定义主题,您已经创建了。

Platform combo box: Platform version used to render the canvas and palette as well as

displaying appropriate themes.平台组合框:平台版本用于呈现画布和调色板以及显示适当的主题。

Custom layout combo boxes: The locale, dock, and time of day combo boxes let you select

different versions of the same layout depending on the device's current state. 自定义布局组合框:locale,码头,和每天的时间组合框让你选择不同版本的相同的布局取决于设备的当前状态。You can create a new version of a layout with the Create button.您可以创建一个新版本的布局与创建按钮。

Figure 5.图5。Configuration chooser配置选择器

Layout Refactoring Support布局重构支持

Google I/O Session Video谷歌I / O会议视频

View the segment on查看段refactoring features重构特性for a rundown of the more important

refactoring features.对于一个破旧的重构特性更重要。

In both the graphical and XML layout editor, there are many features that help you quickly

refactor your layouts. 在这两个图形和布局的XML编辑器,有许多特性,帮助您快速重构你的布局。The following list describes the major refactoring support:下面的列表描述了主要的重构支持:

Change layout改变布局

This lets you change the layout on the fly and re-renders the canvas for you. 这可以让你改变布局在飞行中,被重新呈现给你的画布。You can apply this refactoring to any

layout and the layout is converted to the new type if possible. 你可以把这个重构与任何布局和布局转换为新的类型如果可能的话。In many cases, the opening and closing

tags of the layout's XML element are changed along with things such as ID attributes

and their references. 在许多情况下,打开和关闭标记的布局的XML元素是改变随着诸如ID属性和它们的引用。However, for some supported types, ADT attempts to

preserve the layout, such as changing a然而,对于一些支持类型,ADT试图保存这个布局,如更改 LinearLayoutto a一个 RelativeLayout.

Change widget改变窗口小部件

This lets you select one or more widgets and converts them to a new widget type. 你可以选择一个或多个小部件,并将它们转换成一个新的小部件类型。In addition to

changing the element name, it also removes any attributes that are not supported by the

new widget type and adds in any mandatory attributes required by the new widget type.

除了更改元素名称,它删除任何属性所不支持的新小部件类型和添加在任何强制性属性要求的新小部件类型。If the current ID of a widget includes the current widget

type in its ID (such as a如果当前ID的一个小部件包含当前的小部件类型在其ID(比如一个


本文标签: 布局 应用程序 安装 使用 版本