如何减少Apportable生成APK文件的大小? [英] How to reduce size of the APK file generated by Apportable?

查看:219
本文介绍了如何减少Apportable生成APK文件的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用Apportable端口我的比赛,它的工作原理相当不错。但是这里有一个问题,现在。 Apportable似乎生成APK包时,链接一些库,这使得该.apk文件的文件较大。最简单的例子旋转产生的真实文件的.apk将有近10Mb的这个原因。但是我的游戏的.apk文件具有比由发布者在给定大小小,Apportable使得这个规模无法实现,由于额外的8Mb它补充说。有没有什么办法,以减少产生的.apk文件的大小?也许我可以断开链接一些未使用的库,但我不知道该怎么做。请帮助我,否则我将不得不回退到了cocos2d-x和它会更麻烦端口游戏:(

I'm using Apportable to port my game and it works fairly well. But there's a problem here now. Apportable seems to link some library when generating the apk package and that makes the .apk file larger. The simplest Spin example's generated .apk file will be nearly 10Mb for this reason. However my game's .apk file has to be smaller than a size given by the publisher, and Apportable makes this size unable to achieve due to the extra 8Mb it added. Is there any way to reduce size of the generated .apk file? Maybe I can unlink some unused libraries but I don't know how to do that. Please help me or I will have to fallback to cocos2d-x and it will be much more troublesome to port the game :(

推荐答案

这是Apportable apk文件将永远大于相应的iOS IPA文件,因为不像在iOS上,apk文件需要包括内置于iOS平台的功能库像基金会,objc,和UIKit。

An Apportable apk file will always be bigger than the corresponding iOS ipa file because unlike on iOS, the apk file needs to include libraries for functionality built into the iOS platform like Foundation, objc, and UIKIt.

此外,因为目标C的动态特性,所以无法确定在生成时什么库的部分可能被排除。在理论上,这将是可能做到对一个应用程序的特定基础某些库玉米pression,但是这将是费时且容易出错,一个10M减少很可能仍然是太长了,以减少

Also, because of dynamic nature of Objective C, it is not possible to determine at build time what parts of the libraries could be excluded. In theory, it would be possible to do some library compression on an app specific basis, but it would be time-consuming and error prone and a 10M reduction would likely still be too much to reduce.

Apportable论坛更多的讨论。

这篇关于如何减少Apportable生成APK文件的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆