I've developed an app which is using a lot of resources. I've successfully installed the app, having size of 765MB. But when I run, it crashes. So, I want to know is there any limitation in android for resources or not?
My app contains various images and audios that is why its size is so large.

- 1,537
- 1
- 15
- 35

- 64
- 1
- 7
-
What exception do you got? – Christopher Jan 13 '19 at 10:58
-
2A standalone APK could be 765MB but cannot be upload on PlayStore. The best way is to NOT include Media inside APK but let the App download them in a secondary moment. – emandt Jan 13 '19 at 11:03
-
@emandt is right. That's the technique most owners of bloat apps use. – Taslim Oseni Jan 13 '19 at 11:04
-
is your splashactivity in java folder may you put it on another folder. – Manu Garg Jan 13 '19 at 12:00
-
I did nothing to my activities just copied some audio files to my raw resource folder. – Syed Murtaza Jan 13 '19 at 12:04
-
You need to re-write your question. If the question is about the error specifically, please include the stacktrace directly, and replace the title with something more descriptive. (See how to create a [mcve]). However, if the question is about the Google Play restrictions, it's off-topic. See [Are developer-centric questions about application stores on topic?](https://meta.stackoverflow.com/q/272165/6296561) – Zoe Jan 14 '19 at 07:03
4 Answers
According to those questions: First question , Second Question
so one can have up to 65,535 resources of any one type
Google play store apk size is
Google will store two expansion files per application. Each which can be up to 2GB in size. so expansion files: 4GB (2*2GB)
APK file size limit to 100MB

- 7,301
- 7
- 25
- 53

- 3,372
- 20
- 43
I doubt that your app is crashing because of its size. As long as you have enough space on your device to operate the app, it should work fine. Check your logs for the exception you're getting, that should give you a hint on why it's crashing.
If you plan to upload this apk on Playstore:
Use an expansion file. You cannot upload an APK file of more than 50MB (for API levels < 9) or 100MB (for API levels > 8) to Playstore. So, we can rule that out. Also, your users must have Playstore version 5.2 or higher to install 100 MB APKs.

- 6,086
- 10
- 44
- 69
It's highly likely that your app is crashing due to a different reason than the size of the APK.
One of the more common reasons for crashing when developers use images is an OutOfMemoryError from loading large bitmaps: Here's a documentation about this common error: https://developer.android.com/topic/performance/graphics/load-bitmap
But that guess is mainly due to you saying your huge APK size is due to images and audio, which might happen if you're including really high quality versions of images.
There's no way to know the reason for the crash without checking your error log though.
However, the main thing to keep in mind which others have mentioned is that even though your app might work properly after the error is fixed, you still won't be able to release it on the Play Store with that large of an APK size.
So the large APK size might not be the reason for your app to crash, but it's still an issue.
Here is a documentation on how to reduce the APK size: https://developer.android.com/topic/performance/reduce-apk-size
If it's still not enough, consider using APK Expansion Files: https://developer.android.com/google/play/expansion-files
Otherwise, the only other option is to host the extra files yourself and download it into the device when needed... which might be better or worse than the APK Expansion Files depending on your needs.
But disregard all of that latter part if you don't plan to submit this app to the Google Play Store and only plan to use it through installing locally.

- 3,184
- 1
- 11
- 12
-
Actually I checked my app before adding audio resources. It was working perfect but when I added them and then checked. It is not working. – Syed Murtaza Jan 13 '19 at 11:41