Benchtop Creative builds compelling interactive experiences with exceptional creative vision and technical expertise

 

Android Emulator App Size

Working on a new android app that requires the use of a number of wav audio files.  None of the files themselves are all that large, but there are quite a few of them.  When all the files are present, the resulting APK file is over 40MB.  Not a huge size, but pretty big nonetheless.  This is right on the edge of perhaps considering loading files onto the SD card, however, for this app, i want to have everything included in the APK itself and my audio files are in res/raw.
None of this is really a problem except during the development process.  Even at around 16MB, I continued to get this error message when trying to launch the APK in the emulator:

Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

After much hair pulling and googling, I finally found the way to address this problem by increasing the memory allocation to the emulator.  Perhaps others have found this sooner, but just in case, wanted to repost the solution here.  Note that this is not the same as increasing the file storage size for the app in the emulator.
To increase the size via Ecliplse, do the following:

  1. Go to Run -> Run Configurations...
  2. Highlight your app
  3. You'll see tabs on the right for 'Android', 'Target' and 'Common'
  4. Click on the 'Target' tab as shown in the image
  5. In the field labeled 'Additional Emulator Command Line Options' type the following: -partition-size 1024
  6. Click Apply
  7. For good measure, quit your emulator if it's already running

This should allow your large app to now run in the emulator!

 
 
by R & T