Idea拥有自动导包的功能,下面则介绍如何使用

开启
  1. Setting–>Editor–>General–>Auto Import。

idea导包

  1. 选中Optimize import one the fly(自动去掉没有用的包)和Add unambiguous imports on the fly(自动帮我们优化导入的包)。

idea导包

关闭
  1. 将Optimize import one the fly和Add unambiguous imports on the fly去除即可。

参考文档

相关文章:

  • 2021-12-21
  • 2021-05-30
  • 2021-11-10
  • 2021-11-29
  • 2021-06-02
  • 2021-06-08
  • 2021-11-25
  • 2021-08-29
猜你喜欢
  • 2022-01-01
  • 2021-10-10
  • 2021-09-29
  • 2021-10-09
  • 2021-04-02
相关资源
相似解决方案