.apk 的大小随着目标设备(LDPI、MDPI、HDPI、超大屏幕)的增加而增加
我开发了一个最初针对 MDPI 设备的应用程序,它有很多图像,并且应用程序的大小接近 16MB。
现在我需要定位所有其他设备屏幕。为此,需要将图像复制到定位这些设备。这使得 .apk 大小增加到 45MB 到 50MB。
我的问题是这个文件大小对于市场来说可以接受吗?
或者我可以为每个目标设备生成不同的 .apk 并将其放置在市场上。这样根据设备,将下载相应的 .apk?
请有人帮忙解决这个问题..我对此进行了很多搜索,但毫无结果...
i have a developed an app targeting MDPI devices initially which is having many images and the size of the app is nearly 16MB.
Now i need to target all the other device Screens.For this the images need to be replicated to Target these devices. Which increased the .apk to 45MB to 50MB.
My question over here is this file size acceptable for market place?
Or can i generate different .apk's for each target device and place it market place. so that based on device the downloading corresponding .apk will be downloaded?
Please some one help out of this .. i have searched a lot on this and came to be futile ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
目前 apk 的最大大小为 50mb。为了解决这个问题,资源较多的应用程序(即游戏)会实现将资源下载到 SD 卡。您可能想要研究类似的内容,然后您将下载该特定设备的资源,而不是所有不同屏幕的所有资源。
Currently the max size for an apk is 50mb. To get around this, apps with heavy resources (i.e. games) implement downloading of resources to the sdcard. You may want to look into something like this, and at that point you'd download the resources for that particular device and not every resource for all the different screens.
Sakshi,
您可以使用
AndroidManifest.xml
中的 元素以定位具有特定屏幕尺寸的设备。您可以使用它来创建一个 APK,该 APK 只会出现在市场上与屏幕尺寸兼容的设备上。您还必须为每个包使用不同的包名称,这将使您的构建过程变得非常复杂。Sakshi,
You can use the
<supports-screens>
element in yourAndroidManifest.xml
to target devices with specific screen sizes. You can use this to create an APK that will only show up on the market for devices that have a screen size compatible. You will have to have a different package name for each package as well, and this will greatly complicate your build process.