Class import that turns gray

-1

When you import a class that is not being used, it becomes gray and is immediately deleted. How do I prevent it from being automatically deleted.

I'm using Android Studio.

    
asked by anonymous 28.05.2016 / 23:34

1 answer

0

You need to disable Auto import from your Android Studio . To do this:

1) Go to Preferences

2) In Editor > General , select Auto Import :

3)Leaveonlythefirstoptionselected,likethis:

Ok or Apply for the configuration to be saved.

    
29.05.2016 / 16:32