简体   繁体   English

兼容性:具有Android 2.2的应用程序能否在具有Android 2.0或2.1的手机上运行?

[英]Compatibility: will an application with Android 2.2 work on phones which have Android 2.0 or 2.1?

I am using eclipse Hellios. 我正在使用Eclipse Hellios。 My question is I am developing an application with Android 2.2, will it work on phones which have Android 2.0 or 2.1 我的问题是我正在使用Android 2.2开发应用程序,它将在具有Android 2.0或2.1的手机上运行吗

It really depends on whether you're using parts of the API which were added after Android 2.0 or 2.1. 这实际上取决于您是否使用在Android 2.0或2.1之后添加的API部分。 The best way of ensuring that you only use compatible APIs specify Android 2.0 ( API Level 5) as your build target. 确保仅使用兼容的API的最佳方法是将Android 2.0(API级别5)指定为构建目标。 By doing this, you will get compile time errors if you try and use APIs which are not available in 2.0. 这样,如果尝试使用2.0中不提供的API,则会出现编译时错误。

如果其他版本(例如2.1和2.0)中不存在ApI的使用,则可能会出现问题。反之亦然。

取决于您在清单上定义为minSDKVersion的内容...如果API级别低于该值,则甚至不会安装...但是如果您不使用更高版本的API,则最好的选择是始终以1.5或1.6编译

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM