Increasing the gradle heap size [duplicate]

妖精的绣舞 提交于 2019-12-10 17:01:39

问题


Whenever I try to make the build of the app , gradle takes too much of time and there comes a message showing that you should increase the Gradle size to 3072 MB , currently it is 910 MB . so my question is how can I increase the heap memory of gradle ??


回答1:


Just add

 android {
 ....
 dexOptions {
    // Prevent OutOfMemory with MultiDex during the build phase
    javaMaxHeapSize "4g"
  }
}

in your build.gradle file



来源:https://stackoverflow.com/questions/37203884/increasing-the-gradle-heap-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!