Xavier Peña
Xavier Peña

Reputation: 7909

"There is not enough storage space on the device to store package" when starting Android emulator

I have just updated Xamarin in Visual Studio 2015 (it was a suggested update from Visual Studio).

After the update, when I start debugging with the emulator AVD_GalaxyNexus_ToolsForApacheCordova (Android 4.4 - API 19), the following error occurs:

The "InstallPackageAssemblies" task failed unexpectedly.

System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InsufficientSpaceException: There is not enough storage space on the device to store package: /data/local/tmp/Mono.Android.Platform.ApiLevel_23.apk. Free up some space or use an SD card and try again.

This did not occur just minutes before the update, and the project remained untouched during the update. I am quite sure about that.

The Xamarin documentation has this error documented here, and says:

There is not enough storage space on the device to deploy the package

This occurs when you don't start the emulator from within Visual Studio. When starting the emulator outside of Visual Studio, you need to pass the -partition-size 512 options, e.g.

emulator -partition-size 512 -avd MonoDroid

But I did start the emulator from within Visual Studio.

Upvotes: 15

Views: 21297

Answers (8)

Eduardo Lima
Eduardo Lima

Reputation: 1

I solved this question by cleaning the android system cache, there are several tools in the playstore for it, im my case i was debbuging with a attached device, so there was nothing to do with the emulator settings.

Upvotes: 0

user9471424
user9471424

Reputation:

These following steps work for me

  1. Increase Data diskpartition size 1024MB
  2. Clean and rebuild again

Upvotes: 0

TiTus
TiTus

Reputation: 77

I encountered with the same issue and managed to resolve it by simply uninstall the previous versions from ADB emulator. To uninstall: .run the emulator. .Drag&Drop the application's icon to the trash.

Upvotes: 0

I just clean solution and rebuild again it.

Upvotes: 0

venkat yanamandala
venkat yanamandala

Reputation: 9

Emulator memory issue

increase heap size ( make it 2*x). in my case before it was 256 , then after i made it 512 , now its working fine.

posted by venkat Yanamandala

Upvotes: 1

LeRoy
LeRoy

Reputation: 4436

On MAC if your getting error make sure you increase your dataPartition to 1024M

disk.dataPartition.size : 1024M

On Mac current config: Feel free to add more bytes if you have a better potato(MacBook pro) than mine

android emulator config on mac

Upvotes: 3

Dennis Schröer
Dennis Schröer

Reputation: 2412

Cobus answer didn't help for me. Checking the device's storage, I saw that there should be more than enough space left to deploy my app. My only solution so far is to create new device in the emulator every time this happens. It keeps happening after I deployed my app several times (like 50+ deploys).

Upvotes: 0

Cobus Kruger
Cobus Kruger

Reputation: 8605

Check the internal storage size and available storage of your emulator. Default configuration is often not very large.

Upvotes: 13

Related Questions