4

I am creating an Android application.

My Application has audio and png files which i have saved in res/drawable folder.

When I run the app , its giving error

Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

and in the logcat it says -

ERROR/PackageManager(54): Couldn't copy package file to temp file.

I tried creating new avd also.But i am getting the same error.

I want all those png and audio files.

I don't want to store them in sdcard.

wonea
  • 3,987
  • 17
  • 71
  • 134
user336070
  • 61
  • 1
  • 1
  • 3
  • you should follow this links. [(Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE)][1] [1]: http://stackoverflow.com/questions/6788996/installation-error-install-failed-insufficient-storage-during-runing-emulat – Horrorgoogle Sep 07 '11 at 06:47

5 Answers5

7

As mentioned in this thread the problem can be solved by increasing the size for your system/data partition. Just add the following parameters to your emulator command line:

-partition-size 2047

2047 is the maximum allowed partition size. Use a smaller value if you want to limit the partition size in order to save disk space.

Community
  • 1
  • 1
Stefan Endrullis
  • 3,884
  • 1
  • 27
  • 42
  • Specifically I ran `emulator -avd Pixel_API_28 -netdelay none -netspeed full -partition 2047` – Tyler Sep 21 '19 at 01:15
  • if you are using AVD make sure you read that linked thread - it points out that storage is under advanced settings AND that you need to scroll the panel to find them (which is not obvious) – peterept Oct 21 '20 at 04:17
3

To increase the internal storage of the Android emulator do this: go to AVD Manager,select the Android Virtual Device you want to modify, Edit. On Hardware section check if 'Ideal size of data partition' property is present. If not click New and add it. Edit it's value to 512MB or 1024MB as you wish. (it's important to put 512MB not only 512 otherwise it's value will reset to 0). Now save the changes and launch again the app.

PS. You can also check the .android/avd/[avd_name].avd/config.ini file and check for disk.dataPartition.size=512MB or your desired value. The steps mentioned above will update the disk.dataPartition.size property in config.ini automatically. I also tried just to edit myself the config.ini but doing just that didn't work for me.

wonea
  • 3,987
  • 17
  • 71
  • 134
3

For people who wants to encrease default storage and RAM of emulator: Select Tools > AVD Manager > Edit > Show Advanced Settings > scroll down to Storage and Memmory and set your wanted settings.

Sâu Bự
  • 45
  • 6
1

From avd , I use Wipe data to erase data that I dont use and then I just startup again the emulator

This will factory reset all the apps in the device

enter image description here

Gastón Saillén
  • 9,076
  • 4
  • 39
  • 58
0

In this thread Vishal said:

this problem comes with android 1.5 .. try 2.0 or 2.0.1

Community
  • 1
  • 1
Macarse
  • 87,001
  • 42
  • 169
  • 229