31

I am going to install first application in my android phone, but having some doubts related to Android Memory (Maximum size of APK).

So please help me know and solve the problems:

  1. What is maximum size of the apk that can be supported by the android ?
  2. When we install any apk file in real phone, where does application installed (in SD-card or other memory) ??

I have referred this link: http://groups.google.com/group/android-developers/browse_thread/thread/7965885da4d1a03a and also searched lot.

I came Across the search on the web that many people are facing the same issue What is the maximum size of Application supported by Android. I think this question also help to the people who are connected with Android application programming and development.

Update:

This time i am having 58Mb application from that 52.5MB Images and it runs on the my HTC Hero mobile but On Emulator, it shows an error:

Failed to upload my_application.apk on device 'emulator-5554'
java.io.IOException: Unable to upload file: No space left on device
Launch canceled!

Now please suggest me the way to store images inside the Drawable folder? is there any way to zip the images or such method?

Jonas
  • 121,568
  • 97
  • 310
  • 388
Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
  • Please check out "Update" where i actually needs your help... – Paresh Mayani Aug 25 '10 at 05:29
  • Just out of curiosity, why do you need 52.5MB of images? I don't think anyone is actually going to download that! – CaseyB Aug 25 '10 at 22:01
  • 1
    @CaseyB thanx for the interaction and actually the application is for the image purpose ...its doesnt matter whether anybody download or not..its requirement – Paresh Mayani Aug 26 '10 at 04:05
  • Checkout i have uploaded one more question facing regarding "memory" related issues, please help me and catch me out..please http://stackoverflow.com/questions/3584297/error-in-installation-of-an-application-on-sd-card-in-android-sdk-2-2 – Paresh Mayani Aug 28 '10 at 06:26

2 Answers2

23

Today i came across one point where it is clearly defined that we can upload maximum 50MB sized APK onto the market. So indirectly, we can install an application from a market having maximum 50MB size.

Here is a link: http://www.google.com/support/androidmarket/developer/bin/answer.py?hl=en&answer=113469 , here just check the below sentence.

APK file size: Maximum supported size is 50MB.

So its clear that we can upload maximum 50MB sized APK file, but if we are developing application locally and running/testing for the internal purpose then it is fine.

Update - 6 Mar 2012

Android Apps Break the 50MB Barrier and expanding the Android app size limit to 4GB., check this tutorial.

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:Google Developer blog

Zala Janaksinh
  • 2,929
  • 5
  • 32
  • 58
Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
  • 4
    Hello Prakesh, I think you misunderstood the size, In The second line of tutorial has noted that APK size limit is still 50 MB but you wan upload 2 extra files that file has maximum limits 2 GB each. ====== from tutorial === "The size of your APK file will still be limited to 50MB to ensure secure on-device storage, but you can now attach expansion files to your APK." – Ketan Parmar Mar 19 '12 at 08:49
  • 1
    have a look at this apk size : https://play.google.com/store/apps/details?id=com.gameloft.android.ANMP.GloftKRHM – Aditya Nikhade Sep 21 '12 at 15:30
17
  1. 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

  2. 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 values internalOnly, preferExternal or auto. 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.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Vidar Vestnes
  • 42,644
  • 28
  • 86
  • 100
  • Also, If you would like to test it, you may put a large file into the res/raw folder. – Vidar Vestnes Aug 21 '10 at 06:03
  • @PHP_Jedi really helpful answer....i am using Android 1.5 HTC Hero, what about it? – Paresh Mayani Aug 21 '10 at 06:17
  • @PHP_Jedi what i have to if i want to install 52MB application – Paresh Mayani Aug 25 '10 at 05:31
  • @Paresh, You need at lease 104MB of free application memory before trying to install, I'm not sure if that is possible on Android 1.5. Please use the File Manager app to verify and check how much you have available. – Vidar Vestnes Aug 25 '10 at 09:17
  • @PHP_Zedi but when i am running it for the first time in emulator, however it shows an space related error, as such it is the first application we install, there should be enough space and my application is of 52 MB and it is also happened on the phone also – Paresh Mayani Aug 25 '10 at 09:28
  • @PHP_Zedi "first time" in above comment means there is no any other application installed..... – Paresh Mayani Aug 25 '10 at 09:38
  • @PHP_Zedi hello zedi , without "File Manager" application, we can not check about the memory in phone ?? becoz my client is non-technical..so pls help me on this – Paresh Mayani Aug 27 '10 at 06:17
  • @Paresh I have a HTC Hero available, and it says that it got 165MB of total space for apps. So, try make the user/client free up some space by removing some apps. – Vidar Vestnes Aug 27 '10 at 11:57
  • @PHP_Jedi As i have read your testing at http://vidarvestnes.blogspot.com/2010/08/how-large-can-android-apk-file-be.html , where i got the information regarding "installing application on sd-card" , overthere you got the success with 97 MB but it is not in my case with 58 MB , please help me – Paresh Mayani Aug 28 '10 at 09:52
  • I was running android 2.2, it would not have worked with 1.5. – Vidar Vestnes Aug 28 '10 at 13:29
  • @PHP_Jedi ya thats good..i have also created 2.2 emulator and tested it with but getting error http://stackoverflow.com/questions/3584297/installing-application-on-sd-card-in-android-sdk-2-2 , i am finding your information really helpful...i cay say you can catch me out from this problem...What i have to do install 54MB application in sd-card in android sdk 2.2 ? – Paresh Mayani Aug 30 '10 at 06:41