Android:如何保持向后兼容性? [英] Android: How to maintain backwards-compatibility?

查看:160
本文介绍了Android:如何保持向后兼容性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据这里的说明,让您的应用程式状态为您可以支持的屏幕尺寸,您需要根据Android 1.6编译应用程序。

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.

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

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

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

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

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'.

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

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?

推荐答案

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

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. 选择运行调试配置... (或运行配置)

  2. 在左窗格中,选择 Android应用程序> (您的项目)

  3. 打开主视图

  4. 中的目标选项卡对于部署目标选择模式',选择手动

  5. 应用,然后按关闭

  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

这篇关于Android:如何保持向后兼容性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆