Unity APK size much higher than Resources used in it? - android

I am working with unity 4.0 and my 2d game is almost completed, and ready to upload on Google Play Store. But the problem is that the APK size is very high. My total size of all Assets is 10.7 MB and the final APK size is 17.0 MB. So I can't understand how it happens.
Any help will be appreciated.

The APK does not merely consist of the assets. The Unity player is compiled into the resulting APK and explains the size of the APK being larger than the pure assets alone.

Check out this article in Unity's documentation.
You can reduce the size of the apk by doing:
Reducing the size of textures and compressing it
Reducing the poly count and compressing the meshes and animations
Minimizing the use of external imports
Using .NET subset when compiling

Related

Why does my app exceed 300mb when it should only be around 70mb?

A work app I am working on is currently being generated at over 300mb, when in reality it should be around 70mb. I'm aware of the changes Android made whereby native libraries were not being compressed but the size of the APK being generated seems extreme to me. Setting extractNativeLibs="true" seems to have no effect either as i've tried this. below link is a screenshot to show what's obviously causing the issue but I'm stuck on what else I could try to compress the file further?enter image description here
The native libraries you're pulling are huge, compressed or not. Just the library libtwilio is taking 85 MB, then it's present for 4 different device architectures so I'm not surprised the total size is around 300MB.
You should be using the App Bundle so that the libraries of only one architecture is sent to each device of your users. This will considerably reduce the size of the APK that your users are downloading (the size of the App Bundle will still be big, but that only affects what you upload to the Play Console).
Note that even with App Bundle, you'll still be around 100 MB per split APK, so make sure that you really need this library. If it's not a core feature of your app, you can also consider extracting as a dynamic feature so it's only downloaded by your app when the user needs the feature. That would further reduce the size of the initial download.

How to reduce unity android game size?

Hello buddies I just build my first demo project in unity just for learning purpose and the size of apk file was 21 mb so how can I reduce my apk size?
I have seen many games that have size less than 5 mb, how do they build these kind of game?
Do they use some different game engines?
Thanks 😊
Assets are the most likely candidates for optimization. This information is available in the Editor Log just after you have performed the build. Go to the Console window
(menu: Window < Console), click the small drop-down panel in the top right, and select Open Editor Log.
The Editor Log just after a build:
Suggestions for reducing build size
Textures: select the Texture in the Project view, and in the Inspector
window reduce the Max Size.
Meshes and Animations: set the Mesh Compression to Low, Medium or High. Mesh and Animation compression uses quantization, which means it takes less space, but the compression can introduce some inaccuracies. Experiment with what level of compression is acceptable for your models.
Reducing mobile .NET library size: ou should avoid any dependencies on System.dll or System.Xml.dll. Unity does not include these in the built player by default, but if you use their classes, they are included. These DLLs add about a megabyte to the player’s storage size. If you need to parse XML in your game, you can use a library like Mono.Xml.zip as a smaller alternative to the system libraries. While most Generic containers are contained in mscorlib, Stack and few others are in System.dll, so you should avoid these if possible.
Refer to this link for more details.
of course you can override image size for android , but i recommend you to build under arm v7 architecture , not x86 + armv7 , there are few mobile phone now that uses x86 architecture , you can reduce you game until 11mb , In build section change architecture . If i answered your question please mark as answered

How do I make my app use less storage?

I am making a launcher. Currently it takes up about 20 mb. What can I use to drop it to at most 9 mb?
Compress all your images with pngquant. It will reduce the size significantly atleast 30% i think.
Did you try to profile your apk?
I recommend you to figure out the problem by profiling apk.
Android Studio (2.2 Preview 1) has nice APK Analyzer.
http://android-developers.blogspot.jp/2016/05/android-studio-22-preview-new-ui.html
If the problem is classes.dex size, let's try Proguard to reduce the java classes.
https://developer.android.com/studio/build/shrink-code.html

Compress APK for smaller file size

The apk file size for my app is quite big. Is it possible to reduce the file size by using better compression level or different compression engine such as lzma (https://software.intel.com/en-us/android/articles/native-library-compression-sdk-for-android-apps)?
To simply answer your question:
Yes, use lzma.
Okay, now some other recommendations.
Build in release mode. This is very important, as the app size when built in debug mode can be a lot bigger than when built in release mode.
Compress your images. Often when making an app you don't really look at the size of images, and they usually tend to be the main issue concerning size. Simply opening them in, let's say paint.net, and saving them again with lower quality can help a lot.
Compress your audio files. Load them up in audacity and export them as MP3 with lower quality.
These are some small recommendations of mine. If you need your apk to be smaller still, I'd suggest trying google
You may want to have a look at Crosswalk Lite, Which is a slim version of Crosswalk, with less features, but keeping the great performance.
The project still doesn't have a stable version ( Still in Canary channel ) to be used for production like normal Crosswalk.
I think Crosswalk Lite will be a great solution for problems like Yours, maybe in the near future.

Regarding memory size of android application

Hei, I had developed an android application by using phone-gap framework. The memory size of .apk file is 350 kb. After installation, the usage of memory by the application is 2.00 mb. I want to reduce the usage of memory after installation,actually that is the requirement. On surfing Google, I worked on Images and images are of required pixels only. Is there any alternative to reduce the memory size of application .... thanks in advance.
Your project may have files that were compressed while generating apk file for you. These files are decompressed when you install the application.
Try to reduce the size of the files in your source code.

Categories

Resources