Class import that turns gray

Asked

Viewed 135 times

-1

When you import a class that is not being used, it turns gray and immediately erases it. How do I make it not be automatically deleted.

I’m using Android Studio.

1 answer

0

You need to disable the Auto import of your Android Studio. For that reason:

1) Go to Preferences

2) In Publisher > General , select Auto Import: inserir a descrição da imagem aqui

3) Leave only the first option selected, like this:

inserir a descrição da imagem aqui

Give OK or Apply for the configuration to be saved.

  • Forgive me if this doubt is somewhat Noob, but where do I find the Preferences option?

  • If you are using Windows: Ctrl+Alt+S. If you are using OSX : CMD + ,

Browser other questions tagged

You are not signed in. Login or sign up in order to post.