Android:如何保持向后兼容性?

发布于 2024-08-29 17:57:17 字数 553 浏览 3 评论 0原文

根据此处找到的说明,让您的应用说明您的屏幕尺寸可以支持,您需要针对 Android 1.6 编译您的应用程序。

使用 minSdkVersion 和 targetSdkVersion 这也应该在 Android 1.5 上运行:

  <uses-sdk android:minSdkVersion="3" 
          android:targetSdkVersion="4"/>

但是,当我尝试从 Eclipse 启动我的应用程序以在模拟的 1.5 中运行时,我收到以下错误:

 Failed to find an AVD compatible with target 'Android 1.6'.

这是 eclipse 工具/模拟器的错误吗?或者如何让它正确定位 1.5,同时让我可以选择指定支持的屏幕?

According to the instructions found here, to make your app state which screen sizes you can support, you'll need to compile your app against Android 1.6.

Using the minSdkVersion and targetSdkVersion this should run also on Android 1.5:

  <uses-sdk android:minSdkVersion="3" 
          android:targetSdkVersion="4"/>

However, when I try to launch my app from Eclipse to run in a emulated 1.5, I get the following error:

 Failed to find an AVD compatible with target 'Android 1.6'.

Is this an error of the eclipse tools/emulator? Or how do I get it to also target 1.5 correctly while giving me the option to specify the supported screens?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦在夏天 2024-09-05 17:57:17

您可以强制 Eclipse/ADT 显示所有可用目标的列表,并让您通过更改调试和运行配置来选择较旧的目标

  1. :调试配置...(或运行配置)
  2. 在左侧窗格中,选择 Android 应用程序 > (您的项目)
  3. 在主视图中打开目标选项卡
  4. 对于“部署目标选择模式”,选择手动
  5. >应用,然后关闭

You can force Eclipse/ADT to show you a list of all available targets and let you pick an older target by changing your debug and run configurations:

  1. Select Run > Debug Configurations... (or Run Configurations)
  2. In the left pane, select Android Application > (your project)
  3. Open the Target tab in the main view
  4. For 'Deployment Target Selection Mode', choose Manual
  5. Press Apply, then Close
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文