Android Studio disables import optimization automatically

I had several unused imports in a Java file that were not used. Android Studio invited me to “ Optimize unused imports automatically on the fly . I clicked on it.

Now all unused imports are deleted automatically. Is there any way to get these settings back?

I am new to android, so please forgive me if I missed something simple.

+4
source share
3 answers

Try disabling:

File | Settings | Editor | General | Auto import | Optimize imports on the fly.

+12
source

Shift + cmd + alt + L ( : Shift + rearrange-code-shortkey)

: , , , . , - , .: D

+1

> > p > > (Mac: Android Studio > > p > > ).

" " "". .

0

Source: https://habr.com/ru/post/1628146/


All Articles