Size Limit of Android Application that can be installed as APK

1.3k views Asked by At

I am currently on an Android project which contains Videos/Audios and many Images. All these media files are in res/drawable or res/raw or in the assets directory of android project. When I build APK its size reached 300MBs and I haven't complete 50% of the project yet. Although project will not be uploaded on Google Play Store It will be installed as it is. I am concern about the size of APK it will reach. Can you tell me what is the size limit of the APK that can be installed on an Android device. Thanks.

1

There are 1 answers

2
Mustaqode On BEST ANSWER

There is no size limit, but Google play has a limit of 150mb and .aab files that exceed this limit cannot be uploaded as a normal build instead you have to use feature delivery.

You say that you are not going to upload to playstore; still 300mb is huge and cannot be justified.

  1. Use code obfuscation techniques to remove unwanted code and resources.
  2. Avoid hardcoding / adding huge resource files with the package. i.e., images and videos. Instead, if possible, make them load from a backend like Firestore.
  3. Avoid usage of libraries even for menial tasks ( if you are doing that )

In conclusion, 300 mb is huge. Man, bring it down below 100 mb at least.