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你会发现它们
/
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. 包含工
具来调试和测试,再加上其他实用程序,需要开发一个应用程序。如果你刚刚安装SDK起动器包,那么你已经拥有这个包的最新版本。Make sure you
keep this up to
date.确保你把这个最新的。
SDK
工具Contains
platform-dependent tools for
developing and
debugging your
application. 包含SDK
用于开发和调试Platform-toolsSD工具与平台相关
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
档 platform APIs.离线副本的最新文档对Android平台的api。
There's one SDK
Platform available
for each version of
Android. 有一个SDK平台可供每个版本的平
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系要一个操作系统
统映像 映像。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
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
源来浏览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
apisystem image for
the emulator so
you can test your
app using the
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
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谷歌玩计
Google Play.提供费了静态库和示例,使您可���在您的应用程序集成计费服务与谷歌玩。
Provides the static
libraries and
samples that allow
you to perform
license
verification for
Google Play
your app when
Licensing谷歌玩
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文件,其中一个
版权声明:本文标题:Android SDK 和 ADT 的安装及配置详解 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/jishu/1703466952h452670.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论