在Android 4.1上开发的Android应用程序是否会运行Android 2.3.2?

时间:2012-09-29 23:10:25

标签: android eclipse

今天我开始观察一些新的错误,它不允许我在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.

3 个答案:

答案 0 :(得分:1)

谷歌推荐的最好的事情是使用最新版本的sdk版本。

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

当然,您需要知道,如果您使用仅在新版本上受支持的功能或类,该应用程序将粉碎旧版本。常量可以安全使用,因为它们被转换为简单的字符串和值。

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

答案 1 :(得分:0)

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

答案 2 :(得分:0)

  • 右键单击SDK Manager
  • 选择以管理员身份运行
  • 单击“是”按钮