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

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

猜你喜欢

转载自blog.csdn.net/admin_Object/article/details/81511485