在 Google Market 上发布一款应用的多个版本

发布于 2024-10-08 15:39:03 字数 324 浏览 0 评论 0原文

我有一个 Android 应用程序,我想用它来显示高质量的图像。然而,有许多不同的屏幕尺寸和比例。我知道有一些过滤器可以在市场中显示仅适用于小/中/大屏幕设备的应用程序。

如果我将两种尺寸的图像放入一个应用程序中,应用程序的大小将会增加一倍,对吗?

针对不同的屏幕尺寸制作多个版本是一个好习惯吗?

我想为此类设备制作 3 个版本的 1 个应用程序:

  • 中屏幕 mdpi
  • 中屏幕 hdpi + 大屏幕 mdpi
  • 大(平板电脑)

如果可以做到这一点,我如何在清单中指定它们?或者是在市场的某个地方?

I have an Android app that I would like to display high quality images with. However there are many different screen sizes and ratios. I know there are filters to show apps in Market only for devices with small/medium/large screens.

If I put images of both sizes in 1 app it will double the size of the app, right?

Is it a good practice to make multiple versions for different screen sizes?

I would like to make 1 app in 3 versions for such devices:

  • medium screen mdpi
  • medium screen hdpi + large screen mdpi
  • large (tablets)

If it's possible to do it how can I specify them in manifests? Or is it somewhere in market?

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

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

发布评论

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

评论(4

初见终念 2024-10-15 15:39:03

Android 有一个内置机制,可以为不同的屏幕尺寸和像素密度设计资源。它称为资源目录限定符,您可以阅读所有相关内容这里

例如,对于小屏幕尺寸,您可以创建一个特定的布局文件并将其放置在 res/layout-small 目录中。对于更大的屏幕,您可以创建一个同名的布局文件并将其放置在 res/layout-large (或 res/layout-xlarge)目录中。

对于像素密度,您可以创建图像资源的小型版本并将其放置在 res/drawable-ldpi 目录中(较低的像素密度)。对于更高的像素密度,您可以创建替代版本并将它们放在 res/drawable-hdpi 目录中。

我建议您阅读支持多屏幕页面,并让 Android通过其内置机制帮助您。创建应用程序的三个独立副本对您来说更难维护,并且会让潜在用户感到困惑(他们中的大多数人可能既不知道也不关心“像素密度”)。如何阻止他们下载错误版本的应用程序并因此获得糟糕的体验?

Android has a built-in mechanism for having resources designed for different screen sizes and pixel densities. It's called resource directory qualifiers, and you can read all about it here.

For example, for small screen sizes, you could create a specific layout file and place it in the res/layout-small directory. For a larger screen, you could create a layout file with the same name and place it in the res/layout-large (or res/layout-xlarge) directory.

For pixel density, you could create a small version of your image resources and place them in the res/drawable-ldpi directory (lower pixel densities). And for higher pixel densities, you could create alternate versions and place them in the res/drawable-hdpi directory.

I'd encourage you to read the page on Supporting Multiple Screens, and let Android help you out with its built-in mechanisms. Creating three separate copies of your app is harder for you to maintain, and it confuses potential users (most of whom probably neither know nor care about "pixel densities"). What's to stop them from downloading the wrong version of your app, and getting a lousy experience because of it?

无需解释 2024-10-15 15:39:03

似乎没有人解决您真正关心的文件大小问题,所以我会尝试一下。

您应该将高质量图像打包为一组单独的下载,一个用于您计划支持的每种类型的设备。这使得您的基础应用程序变得很小,并确保最终用户的磁盘空间仅由其所需的图像填充。

我自己没有这样做过,但希望这个想法能让您走上正确的搜索路径。我想您将单独的下载设计为您自己的服务器上的资源,或者市场上的另一组应用程序(即“MyApp Image Pack HDPI”、“... MDPI”等)。

No one seems to be addressing the file size issue you're really asking about, so I'll try.

You should package your high quality images as a set of separate downloads, one for each type of device you plan to support. This makes your base app small, and ensures the end user's disk space is only filled by images it needs.

I've not done this myself, but hopefully the idea will send you on the right search path. I imagine you design the separate download as either resources on your own server, or another set of apps in the market (i.e. "MyApp Image Pack HDPI", "... MDPI", etc.).

另类 2024-10-15 15:39:03

正如Donut上面提到的,android对此有很好的文档 此处此处此处此处

请注意,所有清单文件更改以及如何创建一个支持不同屏幕尺寸、不同密度和不同 SDK 的二进制文件均位于 android 网站。但这需要仔细的规划和测试才能做到这一点。

最好的方法是拥有所有设备配置(此处列出,包括Samsung Galaxy Tab 模拟器(大屏幕,hdpi)可在您的开发环境中使用此处)并进行测试您的应用程序。

As Donut mentions above android has excellent documentation for this here, here, here and here.

Note that all Manifest file changes and how to create one binary that will support different screen sizes, different densities AND different SDK's are at android website. But it requires careful planning and testing to do so.

The best way is to have ALL device configurations (listed here, including the Samsung Galaxy Tab simulater (large screen, hdpi) available here) in your development environment and test your app on them.

无妨# 2024-10-15 15:39:03

您必须为每个版本创建不同的 .apk 并在应用程序的清单文件中定义它。使用此链接
http://developer.android.com/guide/practices/screens-distribution.html

You have to create different .apk for each version and define this in your application's manifest file.use this link
http://developer.android.com/guide/practices/screens-distribution.html

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