Error report in idea compilation Error:Android Dex : [Project] java.lang.OutOfMemoryError : GC overhead limit exceeded

Recommended website http://jingyan.baidu.com/album/9c69d48fa0290013c9024e3f.html

When using IntelliJ idea or Android studio to develop Android applications, if there is a large amount of code, there will be problems when compiling

java.lang.OutOfMemoryError : Java heap space

It’s a mistake. Let’s talk about how to solve this problem.

When using IntelliJ idea or Android studio to develop Android applications, if there is a large amount of code, there will be problems when compiling

java.lang.OutOfMemoryError : Java heap space

Error reported by:

When using IntelliJ idea or Android studio to develop Android applications, if there is a large amount of code, there will be problems when compiling

java.lang.OutOfMemoryError : Java heap space

Error report of:
0

To solve this problem, we need to increase the heap of the corresponding compiler.

Now in the file menu, open the settings interface,
and

Then, in the search box, enter “heap”, and the settings related to heap will be displayed below. Find the corresponding development language settings, and increase heap. In this case, Java heap is not enough, so click Android compiler to increase the corresponding heap.

If the heap of other languages is not enough, turn up the heap in the corresponding menu.

Read More: