步骤:
File --> Settings --> Editor --> General --> Auto Import

勾上选项:
Add unambiguous imports on the fly (快速导入明确的引用的包名)
Optimize imports on the fly(for current project) (即使优化引用的包名(去掉无使用的包名))
Android Studio使用技巧之自动引入代码中所需要的包

相关文章:

  • 2022-12-23
  • 2021-06-16
  • 2021-07-30
  • 2021-05-20
  • 2021-12-02
  • 2021-08-07
  • 2021-12-31
  • 2021-12-07
猜你喜欢
  • 2021-10-11
  • 2022-12-23
  • 2021-10-02
  • 2021-06-14
  • 2021-05-25
  • 2021-10-07
  • 2021-12-02
相关资源
相似解决方案