For Windows/Linux, you can go to File
-> Settings
-> Editor
-> General
-> Auto Import
-> Java
and make the following changes:
(对于Windows / Linux,您可以转到File
- > Settings
- > Editor
- > General
- > Auto Import
- > Java
并进行以下更改:)
change Insert imports on paste
value to All
(更改将Insert imports on paste
值上的Insert imports on paste
到All
)
mark Add unambigious imports on the fly
option as checked
(mark选中“ Add unambigious imports on the fly
选项”作为选中状态)
On a Mac, do the same thing in Android Studio
-> Preferences
(在Mac上,在Android Studio
执行相同操作 - > Preferences
)
After this, all unambiguous imports will be added automatically.
(在此之后,将自动添加所有明确的导入。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…