IDEA常见异常

一、idea编译项目时提示内存不足

  • 提示如下
java.lang.RuntimeException: java.lang.OutOfMemoryError: GC overhead limit exceeded
java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate. Use build process "jps.track.ap.dependencies" VM flag to enable/disable incremental annotation processing environment.
  • 原因
    这种提示主要是因为项目在启动时,项目中使用 Lombok、Dagger、MapStruct 等注解处理器动态生成类信息导致内存不足导致的。
  • 解决方案
    1、 File → Settings → Build, Execution, Deployment → Compiler
    2、 在 Shared build process heap size (Mbytes) 中增加内存(默认 700,建议 2048 或更高)
posted @ 2025-10-24 16:20  蓝迷梦  阅读(2)  评论(0)    收藏  举报