原文:https://www.cnblogs.com/baby123/p/12036579.html
File -> Settings 打开设置 Editor -> Auto Import -> 选中 Optimize imports on the fly