哪个 Android sdk 版本要发布到市场?

发布于 2024-08-17 15:02:12 字数 241 浏览 8 评论 0原文

我想在市场上发布一个应用程序。它没有使用 2.0 版本中的任何新功能(例如蓝牙),并且在使用 1.6 至 2.1 版本的每个模拟器中都能正常工作。

我的问题是关于 sdk 的版本,我应该分发我的应用程序以使其与运行 1.6、2.0 或 2.1 的所有设备兼容吗?

我只有一个运行 1.6 的物理设备来测试它,但正如我所说,它没有使用任何花哨的东西,并且在使用 API 级别 4、5、6 或 7 的模拟器上运行良好。

谢谢

I want to release an app on the market. It uses nothing new from the 2.0 release like bluetooth for instance and it works well in every emulator using version 1.6 to 2.1.

My question is upon version of the sdk should I distribute my application to make it compatible with all devices running 1.6, 2.0 or 2.1?

I only have a physical device running 1.6 to test it, but as I say, it uses nothing fancy and works well on emulators using API levels 4, 5, 6 or 7.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

温折酒 2024-08-24 15:02:12

这里的答案很好,但这里还有一些建议:

  • 不要设置 android:maxSdkVersion 除非您绝对确定需要它。
  • android:minSdkVersion 设置为 3 以便 Cupcake 设备可以运行它。
  • android:targetSdkVersion 设置为 4 以指示该应用已在 Donut 上进行了测试。

然后,您的应用程序应该可以在所有 >= Cupcake 设备上正常运行。如果您计划为高密度屏幕(Droid、Nexus One)提供高密度资源,那么您还需要做更多的工作。最好为此启动另一个线程,但长话短说,您可以将高密度资源放在名为drawable-hdpi-v4的文件夹中。

请务必查看 uses-sdk 文档。

The answers here are good, but here are some more suggestions:

  • don't set android:maxSdkVersion unless you are absolutely sure you need it.
  • set android:minSdkVersion to 3 so Cupcake devices can run it.
  • set android:targetSdkVersion to 4 to indicate the app has been tested on Donut.

Your app should then work well on all >= Cupcake devices. If you have plans to provide high-density resources for high-density screens (Droid, Nexus One), there's a little more work you have to do. It'd be better to start another thread for this, but long story short, you'd put the high-density resources in a folder called drawable-hdpi-v4.

Be sure to check out the uses-sdk doc.

孤檠 2024-08-24 15:02:12

我用 1.5 进行测试并放置 android:minSdkVersion="3"
基于此还有很多设备1.5
http://developer.android.com/resources/dashboard/platform-versions。 html

I'd test with 1.5 and put android:minSdkVersion="3"
Based on this there are still lot's of devices 1.5
http://developer.android.com/resources/dashboard/platform-versions.html

柒七 2024-08-24 15:02:12

如果您的应用程序没有做任何花哨的事情,没有使用这些版本之间已弃用/更改/添加的任何内容,并且可以在相应的模拟器上运行,那么您应该没问题。

只需使用 android:maxSdkVersion="7" 将其限制为 2.1 作为上限 - 您可以随时在下一个 SDK 发布时进行更新。

If your app is doing nothing fancy, uses nothing that has been deprecated/changed/added between these versions and works on the respective emulators, then you should be fine.

Just restrict it to 2.1 as an upper limit using the android:maxSdkVersion="7" — you can always update as and when the next SDK comes out.

空城仅有旧梦在 2024-08-24 15:02:12

我相信以前版本的 SDK 中编写的任何内容都与最新版本完全兼容。

我确定我在设置 IDE 时在 SDK 文档中读过此内容。

如果我是正确的,那么实际上没有必要更新您的应用程序来使用添加的功能,尽管如果您决定扩展它,该选项将始终存在。

I believe that anything written in previous versions of the SDK are fully compatible with the latest version.

I'm sure i read this in the SDK documentation when i was setting up my IDE.

If i'm correct then there is really no need to update your application to make use of the added features, although the option will always be there if you decide to expand upon it.

御弟哥哥 2024-08-24 15:02:12

在我看来,最佳实践是使用 Android 1.6 sdk 进行编译,并在清单中将 minSdkVersion 设置为 3。

我这样说是基于 Dianne Hackborn(名为 hackbod 的用户对已接受的答案发表评论)的建议 此帖子,她是一名负责 Android 源代码本身的 Google 员工。

基本上有相当多的 Android 1.5 SDK 设备,因此使用 Android 1.5 SDK 进行编译将为更多使用 1.5 SDK、1.6 SDK、2.0 SDK 或 2.1 SDK 的设备提供支持,但有些设备需要 1.6 SDK,例如与 HTC Tattoo 一样,使用 1.6 sdk 编译您​​的应用程序,但将 minSdkVersion 设置为 3 允许大多数设备能够使用您的应用程序。

如果您按照接受的答案所述操作并使用最新的 2.1 SDK 进行编译,那么您将错过大量用户。使用 2.1 SDK 编译的应用程序只能由具有 2.1 SDK 或更高版本的设备使用,因此基本上您将用户限制为目前拥有 Google Nexus One 的用户。

In my opinion the best practice is to compile with the Android 1.6 sdk and set the minSdkVersion to 3 in the manifest.

I say this based off of the recommendation of Dianne Hackborn (the user named hackbod that commented on the accepted answer) in this thread, she is a Google employee that works on the Android source itself.

Basically there are quite a few Android 1.5 SDK devices out there so compiling with the Android 1.5 SDK would provide support for more devices with the 1.5 SDK, 1.6 SDK, 2.0 SDK, or the 2.1 SDK but there are devices that require the 1.6 SDK such as the HTC Tattoo so compiling you app with the 1.6 sdk but setting the minSdkVersion to 3 allows for the majority of devices to be able to use your app.

If you do as the accepted answer says and compile with the latest 2.1 SDK then you are missing out on a large amount of users. Applications compiled with the 2.1 SDK can only be used by devices that have the 2.1 SDK or higher so basically you are limiting your users to those that own a Google Nexus One at the moment.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文