简体   繁体   English

为什么我的应用占用这么多空间?

[英]Why does my app take so much space?

I'm finishing my android first app and I'm wondering why does it take so much space. 我正在完成我的android第一个应用程序,我想知道为什么要占用这么多空间。 It just has few activities with WebView and TextView so it should take around 1MB (like the .apk does) but definitely not 12... I've looked around but haven't seen any good reason, compressing images doesn't help much either, please help. 它与WebView和TextView的活动很少,因此应该占用大约1MB的空间(就像.apk一样),但绝对不是12 ...我环顾四周,但没有发现任何好的理由,压缩图像并没有太大帮助要么,请帮助。

在此处输入图片说明

I'm not sure this question is within the scope of Stack Overflow. 我不确定这个问题是否在堆栈溢出的范围之内。 I think your answer is over at Android Enthusiasts though! 我认为您对Android发烧友的回答已经结束了!

https://android.stackexchange.com/a/107204 https://android.stackexchange.com/a/107204

To paraphrase, the APK is compressed version of your app. 换句话说,APK是您应用的压缩版本。 So it may be 1MB, but once decompressed on the phone, it may take 12 MB of space. 因此它可能是1MB,但是一旦在电话上解压缩,则可能需要12MB的空间。 If you are worrying about your app's size because you want the download to be as small as possible, then it shouldn't be a problem. 如果您因为希望下载尽可能小而担心应用程序的大小,那么这应该不是问题。 It downloads from the Play Store as 1 MB. 它从Play商店下载为1 MB。

In Android Studio, go to File-Project Structure and verify the default Dependencies already included in your project. 在Android Studio中,转到“文件-项目结构”,并验证项目中已包含的默认依赖项。 It seems you're not using support-appcompat-v7, for example. 例如,您似乎没有使用support-appcompat-v7。 If you make your apk without this dependency you will get your apk compressed by hundreds of kbytes. 如果您不带此依赖关系而创建apk,则您的apk会压缩成数百KB。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM