Android 简明教程

Android - SDK Manager

要下载并从互联网上安装最新的 Android API 和开发工具,Android 为我们提供了 Android SDK 管理器。Android SDK 管理器将 API、工具和不同的平台分隔到您可以下载的不同软件包。

To download and install latest android APIs and development tools from the internet, android provide us with android SDK manager. Android SDK Manager separates the APIs, tools and different platforms into different packages which you can download.

Android SDK 管理器随 Android SDK 捆绑包提供。您无法单独下载它。您可以从 here 下载 Android SDK。

Android SDK manager comes with the Android SDK bundle. You can’t download it separately. You can download the android sdk from here.

Running Android SDK Manager

下载后,您可以通过以下方式之一启动 Android SDK 管理器:

Once downloaded, you can launch Android SDK Manager in one of the following ways −

  1. Click tools→Android→ SDK Manager option in Eclipse.

  2. Double Click on the SDK Manager.exe file in the Android SDK folder.

运行时,您将看到以下界面:

When it runs you will see the following screen −

sdk

您可以通过选中复选框来选中想要下载哪个软件包,然后单击 Install 来安装这些软件包。默认情况下,SDK 管理器会使用最新的 API 和其他软件包进行更新。

You can select which package you want to download by selecting the checkbox and then click Install to install those packages. By default SDK Manager keeps it up to date with latest APIs and other packages.

下载 SDK 后,将可以使用以下软件包,但前三个软件包是运行您的 SDK 所必需的,其他软件包是推荐的。

Once you download the SDK, following packages are available but first three are necessary to run your SDK and others are recommended.

Sr.No

Package & Description

1

SDK Tools This is necessary package to run your SDK.

2

SDK Platform-tools This package will be installed once when you first run the SDK manager.

3

SDK Platform At least one platform must be installed in your environment to run your application.

4

System Image It’s a good practice to download system images for all of the android versions so you can test your app on them with the Android Emulator.

5

SDK Samples This will give you some sample codes to learn about android.

Enabling Proxy in Android SDK Manager

运行 Android SDK 管理器时,它默认从 Android 储存库和第三方加载项进行检查并向您显示可用的软件包。

When you run the Android SDK Manager, by default it will check from the Android Repository and Third Party Add-ons and display the available packages to you.

如果您想使用代理,可以通过单击菜单中的 *工具→ 选项*来实现。点击后,您将看到以下界面:

If you want to use proxy, you can do it by clicking on the *Tools-→Options*in the menu. Once you click it, you will see the following screen −

sdk1

只需输入代理并运行您的 SDK 管理器。

Just Enter the proxy and run your SDK Manager.

Adding New Third Party Sites

如果您要下载一些第三方开发的 Android 插件,可以通过按照以下步骤在 SDK 管理器中进行此操作 −

If you want to download some Third Party made Android add-ons, you can do it in the SDK manager by following steps −

  1. Click on the Tools option in the menu.

  2. Click on the Manage Add-On Sites option in the sub menu.

  3. Select the User Defined Sites tab.

  4. Click the New button.

将显示以下屏幕 −

Following screen will be displayed −

sdk2

只需添加 Add-on.xml 文件的 URL 并单击 Ok 。您现在可以在您的开发环境中下载第三方插件并使用它。

Just add the URL of Add-on.xml file and click Ok. Now you can download the Third Party Add-on in your development environment and use it.