1

今天我开始观察到一些新的错误,它不允许我在 Eclipse 中创建新的 Android 应用程序。它显示“更新工具”,您的工具安装似乎已过时。此向导依赖于随 Android SDK 工具分发的模板......"

我有 android 2.2 API 8,当我开始工作时我认为它是稳定的。有人可以建议我这个错误是什么吗?还是我需要更新到 Android 4.1 API 16?现有项目会在该版本上运行吗?

以下是我尝试更新到 2.3.3 时的错误:

[2012-09-29 18:17:22 - SDK Manager] File not found: C:\Program Files (x86)\Android\android-sdk\temp\platform-tools_r14-windows.zip (Access is denied)
[2012-09-29 18:17:23 - SDK Manager] File not found: C:\Program Files (x86)\Android\android-sdk\temp\usb_driver_r07-windows.zip (Access is denied)
[2012-09-29 18:17:24 - SDK Manager] Skipping 'Android SDK Tools, revision 20.0.3'; it depends on 'Android SDK Platform-tools, revision 14' which was not installed.
[2012-09-29 18:18:56 - SDK Manager] File not found: C:\Program Files (x86)\Android\android-sdk\temp\android-2.3.3_r02-linux.zip (Access is denied)
[2012-09-29 18:18:57 - SDK Manager] File not found: C:\Program Files (x86)\Android\android-sdk\temp\samples-2.3.3_r01-linux.zip (Access is denied)
[2012-09-29 18:18:58 - SDK Manager] Skipping 'Google APIs, Android API 10, revision 2'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'Intel Atom x86 System Image, Android API 10, revision 1'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'Dual Screen APIs, Android API 10, revision 1'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'Real3D, Android API 10, revision 2'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'ADMIRAL, Android API 10, revision 5'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'ATRIX2, Android API 10, revision 2'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'Bionic, Android API 10, revision 2'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'defy+, Android API 10, revision 1'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'Droid4, Android API 10, revision 2'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'DroidRAZR, Android API 10, revision 5'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'MotorolaPro+, Android API 10, revision 2'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'MT870, Android API 10, revision 2'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'MT917, Android API 10, revision 1'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'PHOTON, Android API 10, revision 1'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'XT882, Android API 10, revision 2'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'XT928, Android API 10, revision 3'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
[2012-09-29 18:18:58 - SDK Manager] Skipping 'Sony Xperia Extensions EDK 2.0, Android API 10, revision 2'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed.
4

3 回答 3

1

谷歌推荐的最佳做法是使用最新版本的 sdk 版本。

将 targetSdkVersion 设置为最新版本(当前为 16),并将其设置在 project.properties 文件中。这将使您的应用程序针对最新的 android 版本进行优化,并允许您使用最新的类和函数。您还可以获得更完整的 API javadocs 和更多常量。

当然,你需要知道,如果你使用一个只在新版本上支持的函数或类,应用程序会在旧版本上崩溃。常量可以安全使用,因为它们被转换为简单的字符串和值。

这就是为什么你应该在发布应用程序之前运行 Lint,以确保不会发生这样的事情。

于 2012-09-29T23:56:22.123 回答
0

您可以安全地更新您的 Android SDK 工具,并且仍然支持 Android 2.2 (API 8)。下载 SDK 工具后,您可以选择要开发的平台,并在那里选择 API 8。您为 Android 2.2 开发的任何内容都适用于 Android 4.1。

于 2012-09-29T23:12:34.300 回答
0
  • 右键单击 SDK 管理器
  • 选择以管理员身份运行
  • 单击是按钮
于 2012-12-08T18:29:07.367 回答