Size Limit of Android Application that can be installed as APK
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.
- Use code obfuscation techniques to remove unwanted code and resources.
- 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.
- 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.
Android - Application (apk) Maximum size
Its probably device specific as devices has a different amount of memory available for application. ref http://groups.google.com/group/android-developers/browse_thread/thread/18cbb2404778618e?pli=1
Its application dependant. The developer may state that the app should be preferrebly install on internal memory, the SD-card, or to let the user choose from SD-card and memory. This is only supported on Android 2.2. On older version of android, version <= 2.1, the app will be installed into the memory. Its defined inside the AndoridMainfest.xml via the
android:installLocation
element. It supports the valuesinternalOnly
,preferExternal
orauto
. But again, only supported on Android 2.2. ref https://developer.android.com/about/versions/android-2.2.html
I tested on my HTC Desire with more than 500 MB of memory. With almost none apps installed I can install an apk that is 43MB, but an apk that is 57MB is too large, even i got plenty of available memory... it fails with
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
The "File Manager" application tells me that im using 60/147MB (40%). The limit seems be 147 MB, but in practice, as i have tested, this is not true...
Update:
I did some testing, and published the results here:
::Edit::
I never changes the any thing in this answer just update this.
Update size by Developer blog please refer this link about the updated answer.
Max size of an Android Application
Android Market raises maximum app size to 4GB, APK files still limited to 50MB
Please study these links, you will get your answer:
Android APK size limitation in Google Play
http://developer.android.com/google/play/expansion-files.html
http://www.engadget.com/2012/03/05/android-market-4gb-app-limit/
Update (28 Sep 2015)
The Google Play team (ANDROID DEVELOPER BLOG) ::(GOOGLE) update the max size limit. They are increasing the APK file size limit to 100MB from 50MB. This means developers can publish APKs up to 100MB in size,Please refer this link for more information on Android Developer Blog
What is the maximum size of a sideloaded APK?
I have sideloaded even applications bigger than 1GB with success on Android devices (mainly VR headsets).
According to this other answer, the limit is 4GB as for the limit of the libziparchive library (APKs are just Zip archives in the end).
Related Topics
Android: How to Create a Dialog Without a Title
How to Find Older Versions of Eclipse Adt
How to Integrate Opencv Manager in Android App
Disable Activity Slide-In Animation When Launching New Activity
Android Get Orientation of a Camera Bitmap? and Rotate Back -90 Degrees
Getting "Socketexception:Connection Reset by Peer" in Android
Set Limit on the Datepickerdialog in Android
Invoke-Customs Are Only Supported Starting with Android 0 --Min-API 26
Trusting All Certificates with Okhttp
Add Ripple Effect to My Button with Button Background Color
How to Use Apply a Custom Drawable to Radiobutton
Android - Application (Apk) Maximum Size
Understanding Command Through Adb Shell and Through Code - Android
Android - Drawable with Rounded Corners at the Top Only
Monodroid: Error When Calling Constructor of Custom View - Twodscrollview
Environment.Getexternalstoragedirectory Does Not Return the Path to the Removable Storage