当项目比较大时,build项目需要占用大量内存,有时候会报错java.lang.OutOfMemoryError,这种情况下修改下idea的设置即可。

File -> Settings -> Build,Execution,Deployment -> Compiler,将 Build process heap size 的默认值700修改为2048(根据自己项目需要调整),然后重启idea即可生效。

 

posted on 2021-04-02 14:18  李白菜  阅读(1099)  评论(0编辑  收藏  举报