Reputation: 8174
I am developing mobile application in xamarin. When I try to launch the UWP app in emulator it displays this error of lack of memory. I tried after closing all other application of my system, restarted the machine still didn't worked. My system has 4 GB RAM. Is it not sufficient to launch the windows UWP application in emulator?
Upvotes: 1
Views: 1321
Reputation: 10015
TL;DR: 4GB RAM is not enough for comfortable mobile development.
While both WP8.0 and UWP emulators might "use" 512mb, they have a different memory footprint for the OS/emulator itself (next to the 512mb). So it is indeed possible that one emulator is just able to run, while the other lacks memory.
The minimum system requirements are 4GB RAM or more, but this is very tight to be able to run your emulators (I quite often have to close things on my one pc with 8GB). Be aware of any other application stealing resources (e.g. tabs in Chrome or a lot of background processes that start up together with your pc). Visual Studio extensions/plugins (e.g. ReSharper) can also steal some of your limited resources. The last factor is the size of your project (if it's a very large project, try to create a new app first and start the emulator from there).
Windows 8.1/10 is more conservative with memory allocation than previous versions. Following the link in the pop-up, you have a workaround to get a bit more out of your system, but be careful with changing your registry (make a backup).
If that's not enough, try closing everything (reboot), first launch the emulator and then open Visual Studio.
The "easiest" (and best long-term) solution is get a new pc with at least 16GB RAM, which will enable you to run multiple emulators.
Upvotes: 3