IntelliJ IDEA可以自动优化导入包,但是有多个同名的类位于不同的包时,需要手动使用Alt + Enter进行导入。

  1. 坐标: File --> Settings --> Editor --> General --> AutoImport -->

  2. 把 Add unambiguous imports on the fiy 和 Optimize imports on the fly (for current project) 两个都打上√  --> Apply --> OK

IntelliJ IDEA如何设置自动导入包?

相关文章:

  • 2021-08-19
  • 2021-07-05
  • 2021-09-08
  • 2021-06-02
  • 2021-04-30
  • 2021-12-29
  • 2021-04-16
  • 2021-10-13
猜你喜欢
  • 2021-09-27
  • 2022-12-23
  • 2021-04-14
相关资源
相似解决方案