Android 2.0.1,版本 1
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
API 级别:6
Android 2.0.1 是一个次要平台版本,从 2009 年 12 月开始可部署到搭载 Android 的手机。此版本包含一些 API 更改、bug 修复和框架行为更改。如需了解变更和修复,请参阅 Framework API 部分。
对于开发者,Android 2.0.1 平台可作为 Android SDK 的可下载组件提供。可下载的平台包含完全符合要求的 Android 库和系统映像,以及一组模拟器皮肤、示例应用等。可下载的平台不包含任何外部库。
如需开始针对 Android 2.0.1 平台进行开发或测试,请使用 Android SDK 和 AVD 管理器工具将该平台下载到 Android 1.6 或更高版本的 SDK 中。
平台亮点
如需查看面向用户的新功能和平台亮点的列表,请参阅 Android 2.0 平台亮点文档。
内置应用
可下载平台中包含的系统映像提供了以下内置应用:
- 闹钟
- 浏览器
- 计算器
- 摄像机
- 相机
- 通讯录
- 自定义语言区域(开发者应用)
- 开发者工具(开发者应用)
- 拨号器
|
- 电子邮件
- 图库
- 手势构建器
- 用于输入日语文本的 IME
- 消息功能
- 音乐
- 设置
- 备件(开发者应用)
|
2.0.1 中的新变化“开发者工具”应用现在包含“同步测试工具”应用,可让您快速轻松地测试第三方同步适配器。
语言区域
可下载平台中包含的系统映像提供多种内置语言区域。在某些情况下,特定区域的语言区域提供特定区域的字符串。在其他情况下,系统会使用该语言的默认版本。下列为 Android 2.0.1 系统映像中提供的语言(采用 language_country/region 语言区域描述符)。
- 中文(中国)(zh_CN)
- 繁体中文(台湾)(zh_TW)
- 捷克语 (cs_CZ)
- 荷兰语(荷兰)(nl_NL)
- 荷兰语(比利时)(nl_BE)
- 英语(美国)(en_US)
- 英语(英国)(en_GB)
- 英语(加拿大)(en_CA)
- 英语(澳大利亚)(en_AU)
- 英语(新西兰)(en_NZ)
- 英语(新加坡)(en_SG)
- 法语(法国)(fr_FR)
- 法语(比利时)(fr_BE)
|
法语(加拿大)(fr_CA)
法语(瑞士)(fr_CH)
德语(德国)(de_DE)
德语(奥地利)(de_AT)
德语(瑞士)(de_CH)
德语(列支敦士登)(de_LI)
意大利语(意大利)(it_IT)
意大利语(瑞士)(it_CH)
日语 (ja_JP)
韩语 (ko_KR)
波兰语 (pl_PL)
俄语 (ru_RU)
西班牙语 (es_ES)
|
本地化的界面字符串与可通过“设置”访问的语言区域匹配。
模拟器皮肤
可下载的平台包含一组模拟器皮肤,可用于在不同屏幕尺寸和分辨率下对应用进行建模。模拟器皮肤如下:
-
QVGA(240x320、低密度、小屏幕)
-
WQVGA(240x400、低密度、标准屏幕)
-
FWQVGA(240x432、低密度、普通屏幕)
-
HVGA(320x480、中等密度、普通屏幕)
-
WVGA800(480x800、高密度、普通屏幕)
-
WVGA854(480x854 高密度,普通屏幕)
如需详细了解如何开发可在所有 Android 设备上正常显示和运行的应用,请参阅支持多种屏幕。
开发者功能
以下部分介绍了可下载的 Android 2.0 平台组件提供的新开发者功能。
Ant 支持
- 调试模式和发布模式应用签名。发布模式签名包含对
zipalign
优化的集成支持。如需了解详情,请参阅为应用签名。
- 添加了新的 Ant 构建系统,支持 Emma 插桩项目(代码覆盖率)。
Framework API
以下部分介绍了对 Android 2.0.1 平台提供的应用框架 API 所做的更改。不过,请注意,Android 2.0.1 是 Android 2.0 的次要版本,因此如需详细了解对 Android 2.0 所做的更改,请参阅 Android 2.0 版本说明。
API 级别
Android 2.0.1 平台提供了更新后的框架 API 版本。Android 2.0.1 API 会被分配一个整数标识符(6),该标识符存储在系统本身中。此标识符称为“API 级别”,可让系统在安装应用之前正确确定应用是否与系统兼容。
如需在应用中使用 Android 2.0.1 中引入的 API,您需要在应用清单的 <uses-sdk>
元素的属性中设置适当的值“6”。
如需详细了解如何使用 API 级别,请参阅 API 级别文档。
API 变更摘要
下面总结了框架 API 的变更。
行为变更
下面总结了会影响某些框架 API 行为但不会添加或移除 API 功能的变更。
蓝牙
ACTION_REQUEST_ENABLE
和 ACTION_REQUEST_DISCOVERABLE
返回的值发生了变化:
现在,如果联系人未持久化(例如,保存操作被修剪为无操作),ACTION_INSERT
intent 会返回 RESULT_CANCELED
。
问题修复
以下简要介绍了影响某些框架 API 的 bug 修复。
资源
该框架现在会正确选择使用 API 级别限定符的项目文件夹中的应用资源。例如,drawable-v4/
是适用于 API 级别 4(或更高级别)设备的可绘制资源文件夹。此版本匹配功能无法正常运行,现已修复。
现在,当使用(现已废弃的)Contacts
API 发出请求时,ACTION_INSERT
intent 会返回适当类型的 URI。
其他框架修复
API 差异报告
如需详细了解 Android 2.0.1(API 级别 6)与 API 级别 5 中的 API 变更,请参阅 API 差异报告。API 级别 6 中的 API 变更非常少,因此您可能还会对 4 和 5 之间的 API 差异感兴趣。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-26。"],[],[],null,["# Android 2.0.1, Release 1\n\n*API Level:* **6**\n\nAndroid 2.0.1 is a minor platform release\ndeployable to Android-powered handsets starting in December 2009.\nThis release includes minor API\nchanges, bug fixes and framework behavioral changes. For information on changes\nand fixes, see the [Framework API](#api) section.\n\nFor developers, the Android 2.0.1 platform is available as a\ndownloadable component for the Android SDK. The downloadable platform includes a\nfully compliant Android library and system image, as well as a set of emulator\nskins, sample applications, and more. The downloadable platform\nincludes no external libraries.\n\nTo get started developing or testing against the Android\n2.0.1 platform, use the Android SDK and AVD Manager tool to\ndownload the platform into your Android 1.6 or later SDK.\n\nPlatform Highlights\n-------------------\n\nFor a list of new user features and platform highlights, see the [Android\n2.0 Platform Highlights](https://developer.android.com/about/versions/android-2.0-highlights.html) document.\n\nBuilt-in Applications\n---------------------\n\nThe system image included in the downloadable platform provides these\nbuilt-in applications:\n\n|-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| - Alarm Clock - Browser - Calculator - Camcorder - Camera - Contacts - Custom Locale (developer app) - Dev Tools (developer app) - Dialer | - Email - Gallery - Gestures Builder - IME for Japanese text input - Messaging - Music - Settings - Spare Parts (developer app) |\n\nNew with 2.0.1 The Dev Tools app now\nincludes a \"Sync Tester\" application to provide quick and easy testing of\nthird-party sync adapters.\n\nLocales\n-------\n\nThe system image included in the downloadable platform provides a variety of\nbuilt-in locales. In some cases, region-specific strings are available for the\nlocales. In other cases, a default version of the language is used. The\nlanguages that are available in the Android 2.0.1 system\nimage are listed below (with *language* _*country/region* locale\ndescriptor).\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| - Chinese, PRC (zh_CN) - Chinese, Taiwan (zh_TW) - Czech (cs_CZ) - Dutch, Netherlands (nl_NL) - Dutch, Belgium (nl_BE) - English, US (en_US) - English, Britain (en_GB) - English, Canada (en_CA) - English, Australia (en_AU) - English, New Zealand (en_NZ) - English, Singapore(en_SG) - French, France (fr_FR) - French, Belgium (fr_BE) | - French, Canada (fr_CA) - French, Switzerland (fr_CH) - German, Germany (de_DE) - German, Austria (de_AT) - German, Switzerland (de_CH) - German, Liechtenstein (de_LI) - Italian, Italy (it_IT) - Italian, Switzerland (it_CH) - Japanese (ja_JP) - Korean (ko_KR) - Polish (pl_PL) - Russian (ru_RU) - Spanish (es_ES) |\n\nLocalized UI strings match the locales that are accessible\nthrough Settings.\n\nEmulator Skins\n--------------\n\nThe downloadable platform includes a set of emulator skins that you can use for modeling your application in different screen sizes and resolutions. The emulator skins are:\n\n- QVGA (240x320, low density, small screen)\n- WQVGA (240x400, low density, normal screen)\n- FWQVGA (240x432, low density, normal screen)\n- HVGA (320x480, medium density, normal screen)\n- WVGA800 (480x800, high density, normal screen)\n- WVGA854 (480x854 high density, normal screen)\n\nFor more information about how to develop an application that displays and functions properly on all Android-powered devices, see [Supporting Multiple Screens](/guide/practices/screens_support).\n\nDeveloper Features\n------------------\n\nThe sections below provide information about new developer features offered by the downloadable Android 2.0 platform component.\n\n### Ant Support\n\n- Debug- and release-mode application signing. Release-mode signing includes integrated support for `zipalign` optimization. For more information, see [Signing Your Applications](/tools/publishing/app-signing#releasecompile).\n- Adds new Ant build system with support for Emma instrumentation projects (code coverage).\n\nFramework API\n-------------\n\nThe sections below provide information about changes made to the application\nframework API provided by the Android 2.0.1 platform. Note,\nhowever, that Android 2.0.1 is a minor release to Android 2.0, so for more\ninformation about the changes made to in Android 2.0, please refer to the\n[Android 2.0 version notes](/about/versions/android-2.0#api).\n\n### API level\n\nThe Android 2.0.1 platform delivers an updated version of the framework\nAPI. The Android 2.0.1 API\nis assigned an integer identifier --- **6** --- that is\nstored in the system itself. This identifier, called the \"API Level\", allows the\nsystem to correctly determine whether an application is compatible with\nthe system, prior to installing the application.\n\nTo use APIs introduced in Android 2.0.1 in your application, you need to\nset the proper value, \"6\", in the attributes of the `\u003cuses-sdk\u003e`\nelement in your application's manifest.\n\nFor more information about how to use API Level, see the [API Levels](/guide/topics/manifest/uses-sdk-element#ApiLevels) document.\n\n### API changes summary\n\nThe following is a summary of changes to the framework APIs.\n\n- New `quickContactBadgeStyle*` attributes that let applications apply necessary styles to the [QuickContactBadge](/reference/android/widget/QuickContactBadge) widget.\n- Remove support for the [ACTION_CONFIGURATION_CHANGED](/reference/android/content/Intent#ACTION_CONFIGURATION_CHANGED) broadcast when declared as a filter in the manifest. To receive this broadcast, an application must do so from the application at run-time, with [registerReceiver(BroadcastReceiver, IntentFilter)](/reference/android/content/Context#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)).\n\n### Behavior changes\n\nThe following is a summary of changes that affect the behavior of some\nframework APIs but do not add or remove API functionality.\n\n#### Bluetooth\n\nChanges to the values returned by [ACTION_REQUEST_ENABLE](/reference/android/bluetooth/BluetoothAdapter#ACTION_REQUEST_ENABLE) and\n[ACTION_REQUEST_DISCOVERABLE](/reference/android/bluetooth/BluetoothAdapter#ACTION_REQUEST_DISCOVERABLE):\n\n- [ACTION_REQUEST_ENABLE](/reference/android/bluetooth/BluetoothAdapter#ACTION_REQUEST_ENABLE) now returns [RESULT_OK](/reference/android/app/Activity#RESULT_OK) if Bluetooth was successfully enabled and [RESULT_CANCELED](/reference/android/app/Activity#RESULT_CANCELED) if the user rejected the request to enable Bluetooth, rather than 0 and -1 (or -2), respectively.\n- [ACTION_REQUEST_DISCOVERABLE](/reference/android/bluetooth/BluetoothAdapter#ACTION_REQUEST_DISCOVERABLE) now returns [RESULT_CANCELED](/reference/android/app/Activity#RESULT_CANCELED) if the user rejected the request to enable discoverability or if Bluetooth is not enabled, rather than -1 and -2, respectively.\n\n#### Contacts\n\nThe [ACTION_INSERT](/reference/android/content/Intent#ACTION_INSERT) Intent now returns [RESULT_CANCELED](/reference/android/app/Activity#RESULT_CANCELED) in cases where the contact was not\npersisted (for example, if the save was trimmed to a no-op).\n\n### Bug fixes\n\nThe following is a summary of bug fixes that affect some framework APIs.\n\n#### Resources\n\nThe framework now correctly selects application resources in project\nfolders that use the API Level qualifier. For example, `drawable-v4/` is a\nfolder of drawable resources for API Level 4 (or higher) devices. This version\nmatching did not work properly and has been fixed.\n\n#### Contacts\n\nThe [ACTION_INSERT](/reference/android/content/Intent#ACTION_INSERT) Intent now returns the\nappropriate kind of URI when the request is made using the (now\ndeprecated) [Contacts](/reference/android/provider/Contacts) APIs.\n\n#### Other Framework fixes\n\n- [getCallingPackage()](/reference/android/app/Activity#getCallingPackage()) now properly reports the package name, rather than the process name.\n\n### API differences report\n\nFor a detailed view of API changes in Android 2.0.1 (API Level 6), as compared to\nAPI Level 5, see the [API\nDifferences Report](/sdk/api_diff/6/changes). There are very few API changes in API Level 6,\nso you might also be interested in reviewing the [API\ndifferences between 4 and 5](/sdk/api_diff/5/changes)."]]