安卓 2.1 与 2.2
我这一年的大部分时间都在为 Android 2.2+ 进行开发。但当我查看维基百科上的“Android 设备列表”时,我看到了大量 Android 2.1 设备。其中很多可能从未收到过 OTA 更新,有些是不久前发布的。我已经看到有关 Android 2.2 使用最广泛的现成统计数据,但我不禁觉得我正在削减大量受众。
我发现 2.1 和 2.2 之间存在一些差异(例如 TabWidgets),但如果我将 SDK 降至 2.1,我应该注意哪些差异?
现在这是否更不相关了,欢迎想法和经验,或者信息来源的链接
I have been developing for Android 2.2+ for the majority of the year. But when I look at the "List of Android Devices" on wikipedia, I see a substantial number of Android 2.1 devices. A lot of these may have never received OTA updates and some were released not that long ago. I've seen the readily available statistics about Android 2.2 being the most widely used, but I can't help feel like I'm cutting a big audience out.
I've seen a few differences between 2.1 and 2.2 (like with TabWidgets) but if I just dropped my SDK down to 2.1 what differences should I be aware of?
Is this even less relevant now, thoughts and experience welcome, or links to informative sources
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
与往常一样,这取决于您的应用程序的具体功能。我不想劝你不要支持 2.1。 我当然不是专家。但您必须权衡要让您的应用程序可供最后 20% 的市场使用需要付出多少工作。
尽管我喜欢保持大量向后兼容性的想法,但我认为支持“当前和未来市场”比花费大量精力支持旧设备更有意义。当然,如果您的应用程序可以在较旧的 API 级别上正常运行,那就太好了,您显然应该这样设置。谁知道呢,也许添加对 2.1 的支持会比我输入此内容花费的时间更少。 :)
您可以直接在 Android 平台版本网站上查看最新统计信息。
我认为更有趣的图表是第二张图,它显示了“最近访问 Android Market 的 Android 设备数量”。 (此处内嵌当前的)。因此,如果您支持 2.2,那么看起来您就支持了超过 75% 的市场(而且这个数字只会增长)。
另一件需要注意的事情是性能。除了8 之前的 API 不支持的功能之外,旧设备有时不具备新设备的性能。 (情况并非总是如此,因为有数十台设备。)我使用的一台测试设备不支持动态壁纸,不是因为 API,而是因为该设备没有足够的马力。
As always, it depends on the specific features of your application. I don't want to talk you out of supporting 2.1. I'm certainly not an expert. But you have to weight how much work it is to make your application available to the last 20% percent of the market.
Although I like the idea of maintaining a lot of backward compatibility, I think it makes sense to support the "current and future market" more than spending a lot of effort to support older devices. Of course, if your application works well with older API levels that's great and you should obviously set it as such. Who knows, maybe adding support for 2.1 will take you less time than it took me to type this. :)
You can see up-to-date stats directly on the Android Platform Versions website.
I think the more interesting graph is the 2nd one that shows "number of Android devices that accessed Android Market" recently. (current one inlined here). So if you support 2.2 it looks like you're supporting over 75% of the market (and that number is only going to grow).
One other thing to watch out for is performance. In addition to features the pre-8 API doesn't support, older devices sometimes just don't have the performance of the newer ones. (Not always the case since there are dozens of devices.) One test device I used didn't support Live Wallpapers, not because of the API, but because the device just didn't have enough horsepower.
我肯定会以 2.1 为目标,以获得最多的受众。
你必须意识到的变化并不大,但如果你不抓住它们,肯定会让你陷入困境。
有几点:
我建议使用 android 开发人员的参考页面按版本过滤的功能。它将使 2.1 的编码变得更加容易。
I'd definitely target 2.1 to get the largest audience.
The changes you have to be aware of are not huge, but can definitely stick you if you don't catch them.
A couple of things:
I suggest using the android dev's reference pages feature of filtering by version. It'll make coding for 2.1 much easier.
http://developer.android.com/sdk/android-2.2.html
我个人认为你应该只使用你能支持的最低版本,而不损害你的功能、特性或用户体验。
http://developer.android.com/sdk/android-2.2.html
Personally I think you should just use the lowest you can support without damaging your functionality, features or UX.