Out of memory what is it? android studio

1

I showed up today in my android studio. What does it mean and what option do I choose not to harm my project?

    
asked by pauuu 17.10.2018 в 18:19
source

1 answer

1

This is not a memory consumption problem in your application, in fact the IDE Android Studio has no memory.

I suggest you increase the "Heap size" ( -XmxheapSize ),

  

By default, Android Studio has a maximum size of   of Heap which is 1280 MB. If you work on a large project or your system   It has a lot of RAM, you can improve the performance by increasing the size   Heap maximum in the VM options for Android Studio.

this in the studio64.exe.vmoptions file, you must restart Android Studio to make the change.

But the best option is to do it from "Edit Custom VM Options..." :

It is important to note that the value of -XmxheapSize should be based on the size of your project and the available RAM on your computer.

Review what the documentation says:

For reference, if you have more than 4GB of RAM and a medium-sized project, you should set the size maximum of the heap in 2 GB or more.

If you want to set the "heap size" in 2 GB you can use:

-Xmx2g
    
answered by 17.10.2018 в 19:06