Android 中的向前或向后兼容性?
我想知道 Android 是否提供任何类型的兼容性,即向前或向后。这意味着,就像在 Blackberry 中一样,如果使用 JDE 4.2 开发应用程序,那么该应用程序将在任何具有 OS 4.2 或更高版本的手机上运行,这意味着它具有向前兼容性。 Android 中有类似的东西吗?
假设我使用 Android SDK 1.5 开发应用程序,那么该应用程序可以在任何操作系统为 1.5 或更高版本的手机上运行。
希望尽快得到答复。
谢谢&问候 苏尼尔
I would like to know whether the Android provides any sort of compatibility i.e either forward or backward. It means as in Blackberry if develop an Application with JDE 4.2 then that application will work on any handset with OS 4.2 or higher which means it has forward compatibility. Is there anything similar in Android?
Suppose I develop application with Android SDK 1.5 then will that application work on any handset having OS 1.5 or higher.
Hope to get a reply soon.
Thanks & Regards
Sunil
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
主要版本的前向兼容性在一定程度上得到了保证。在 Android 上,您的目标是最低 api 规范。只要您不调用私有 API,Google 就会在加入其开放移动联盟的设备上保持兼容性。
这并不意味着有人无法获得 Android 源代码并发布自己的基于 Android 的操作系统,从而破坏所有兼容性。这些设备不会进入谷歌市场,因为只有谷歌测试的许可设备才能使用它。如果那是您要发布的地方,那么您可能不会遇到任何麻烦。
Forward compat is somewhat assured on major versions. On Android you target a minimum api spec. As long as your are not calling private APIs, Google keeps compatibility going forward on devices that join in on their Open Mobile Alliance.
It doesn't mean someone can't get the Android source and release an Android based OS of their own that breaks all compatibility. These devices wouldn't get Google's Market Place because only licensed devices that Google tests get to use that. If that is where you are releasing, you probably won't have any trouble.
因为 Android 文档是根据 Apache 许可证获得许可的,所以我很乐意引用很大一部分内容:
-- 来自: http://developer.android.com/ Guide/topics/manifest/uses-sdk-element.html
尽管 Android 应用程序向前兼容,但它们将无法使用编写后引入的 SDK 功能,这并不奇怪。
Because the Android documentation is licensed under the Apache license, I'm comfortable quoting a large section:
-- From: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
Though they are forward compatible, Android apps will not be able to use features of the SDK that were introduced after they were written, not surprisingly.
这不是“向前兼容性”的意思。您正在考虑“向后兼容性”。 “向后兼容性”意味着新版本的平台(即Android)仍将运行针对旧版本平台开发的旧软件。 “向前兼容性”恰恰相反——针对旧版本平台开发的旧软件仍然能够利用新平台的新功能。
向后兼容的一个例子是,他们重命名了 ICS 中的方法之一,但仍然实现了旧方法的已弃用版本,并将其转发到新的实现。
虽然几乎总是保证向后兼容性,但仅在某些情况下保证向前兼容性。向前兼容性的一个例子是这样的情况:他们在操作系统中实现了新功能(例如,“捏合缩放”),并且在该功能存在之前编写的应用程序仍然能够使用该功能。
That's not what "forwards compatibility" means. You are thinking of "backwards compatibility". "Backwards compatibility" means that new versions of the platform (i.e. Android) will still run old software developed against an older version of the platform. "Forwards compatibility" is the precise converse -- older software developed against an older version of the platform will still be able to leverage new features of the new platform.
An example of backwards compatibility is that they rename one of the methods in ICS but still implement a deprecated version of the old method and have it forward to the new implementation.
While backwards compatibility is almost always guaranteed, forwards compatibility is only guaranteed in certain scenarios. An example of forward compatibility would be a situatation where they implement a new feature in the OS (for example, "pinch to zoom") and applications written before that feature existed are still able to enjoy this feature.
我认为Android系统是向后兼容的,这保证了Android应用程序的向前兼容性。
I think Android System is backward-compatible, and that ensures the forward compatibility of Android application.