How to increase maximum heap size for the Gradle daemon?

前端 未结 5 939
孤街浪徒
孤街浪徒 2021-02-20 07:41

When signin an apk, I got this message:

To run dex in process, the Gradle daemon needs a larger heap.
It currently has 1024 MB.
For faster builds, increase the m         


        
5条回答
  •  别那么骄傲
    2021-02-20 08:22

    Add following code to your build.gradle file.

     android {
         dexOptions {
         incremental true       
         javaMaxHeapSize "4g"
          }
        }
    

    Reference : Source

提交回复
热议问题