(1)勾选红框中的选项 (2)开启项目运行时自动build,在打开的页面上快捷键(maintenance)ctrl + shift + a 搜索命令:registry –> 勾选compiler.automake.allow.when.app.running 重启idea,即可!