解決方案
找了很多方法,比如設置jdk的版本,重啟重裝idea問題一直存在。
最后設置了一下共享構建進程堆大小(Mbytes): 問題解決了。
設置的路徑如下:
File | Settings | Build, Execution, Deployment | Compiler
其他方案參考:
https://blog.csdn.net/weixin_34850743/article/details/104291937
https://blog.csdn.net/weixin_30640291/article/details/99412008