Android - 在 Android 1.6 中开发的应用程序可以在 Android 2.0 中运行吗?
Android是否向后兼容,换句话说,在Android 1.6中开发的应用程序可以在Android 2.0中运行吗?
我刚刚发布了一个 2.0 应用程序,发现使用我的 G1(Android 1.6)手机在市场上找不到它。但显然其他人正在下载它。
我应该将应用程序降级到 1.6 还是需要为每个 Android 版本创建单独的应用程序?
Is Android backwards compatible, in other words can an application developed in Android 1.6 run in Android 2.0?
I just published a 2.0 application and discovered that I can't find it in the market using my G1 (Android 1.6) phone. But apparently others are downloading it.
Should I downgrade the application to 1.6 or do I need to create separate applications for each Android version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以针对您想要的任何版本进行构建,并将其发布到市面上的每部 Android 手机,并让其在市场中显示(如果您确定它稳定的话)。
我有一个针对 1.6 SDK 构建的 Android 应用程序。我确保不使用任何 1.6 特定的 API,但我确实希望构建环境允许我使用特定于分辨率的图标和资源,而 1.5 SDK 不知道如何执行此操作。然而,运行 1.5 的手机在实际运行时不会因特定于分辨率的布局结构而卡住。
我将 minSdkVersion 标记为 3 (Android 1.5),并将 targetSdkVersion 设置为 4 (Android 1.6)。这告诉 Android 手机和市场,我已经确定该应用程序在低至 Android 1.5 的手机上运行良好,但它是针对 1.6 构建的(并且可以假设可以在 2.0 等更高版本上运行)。
由于该应用是开源的,因此这里有一个链接我的 AndroidManifest.xml
Android 开发人员文档 更详细地描述了uses-sdk属性
You can build against any version you want, and release it to every Android phone out there and have it show up to them in the Market, if you're sure it's stable.
I have an Android app that I build against the 1.6 SDK. I make sure not to use any 1.6-specific APIs, but I do want the build environment to let me use resolution-specific icons and assets, which the 1.5 SDK doesn't know how to do. Phones running 1.5, however, won't choke on the resolution-specific layout structure when it actually runs.
I mark the minSdkVersion as 3 (Android 1.5) and set the targetSdkVersion as 4 (Android 1.6). This tells Android phones, and the Market, that I've determined the app runs fine on phones as low as Android 1.5, but was built against 1.6 (and can be assumed to work on higher versions like 2.0).
Since the app is open-source, here's a link to my AndroidManifest.xml
This page in the Android Developer docs describes the uses-sdk attributes in more detail
由于您已经使用 1.6 SDK 开发了应用程序,因此您应该(必须?)将其标记为 1.6。
这将增加能够查看和下载您的应用程序的人数。
如果 2 个应用程序(1.6 和 2.0)相同,则不需要它们。如果您愿意,可以尝试使用 Android SDK 2.0 的新功能来改进您的应用程序,然后:
Since you have developed your app with the 1.6 SDK you should(must?) flag it with 1.6.
This will increase the number of person who will be able to see and download your app.
Don't need to have 2 apps (1.6 and 2.0) if they are the same. If you want you can try to evolve your app by using new features of the Android SDK 2.0 and then:
只是说 1.6 应用程序可以在 2.0 上运行,但 2.0 应用程序不能在 1.6 上运行
其他人正在下载您的 2.0 应用程序,因为他们的手机上装有 2.0 android(例如:摩托罗拉 Droid
)
再见
pd:对不起我的英语
Just to say that an 1.6 app can run on 2.0 BUT NOT 2.0 app can run on 1.6
Others are downloading your 2.0 app because they hay 2.0 android on their phones (ex: Motorola Droid)
With no more
bye bye
pd: sorry my english
我认为如果你建立了一个基于android 1.6的应用程序,它可以在1.6和2.0平台上运行。
如果这个应用程序基于android 2.0,并且您想在android 1.6平台上运行它,只需在AndroidMenifest.xml中设置minsdk,如下所示“uses-sdk android:minSdkVersion =“4””,那么它也可以在1.6平台上运行。
谢谢
I think if you established a app based on android 1.6 it can run on 1.6 and 2.0 platform both.
If this app is based on android 2.0 and you want to run it on android 1.6 platform just set minsdk in AndroidMenifest.xml like this " uses-sdk android:minSdkVersion="4" ", then it can also run in 1.6 platform.
thanks