Out of memory error: Java heap memory on Android Studio

后端 未结 12 788
-上瘾入骨i
-上瘾入骨i 2020-12-24 05:47

How do I fix java.lang.OutOfMemoryError: Java heap space when compiling my Android project?

I get this after I upgraded to version 1 of Android Studio.

12条回答
  •  时光说笑
    2020-12-24 06:08

    None of the answers worked for me but finally I found something that worked in my case:

    Automatically managing paging files size

    In windows:

    1. Under "Advanced System Settings"
    2. Advanced Tab
    3. Performance section, settings...
    4. Advanced Tab
    5. Virtual memory... Change...
    6. Select Automatically manage paging files size for all drives

    I don't remember why I had this unchecked but this was causing trouble in my gradle builds (with flutter).

提交回复
热议问题