How to solve java.lang.OutOfMemoryError: GC overhead limit exceeded error in android studio

后端 未结 7 932
执笔经年
执笔经年 2021-01-31 02:53

I am using android studio 1.0 RC for 64 bit linux.

When I run my application I am getting

\"java.lang.OutOfMemoryError: GC overhead limit          


        
7条回答
  •  别那么骄傲
    2021-01-31 03:34

    Add this line in your build.gradle

    dexOptions
             {
                   incremental false
                   javaMaxHeapSize "2048M" 
                   preDexLibraries = false
             }
    

提交回复
热议问题