Auto import not working for Android classes in Android studio

Minto picture Minto · Jun 25, 2014 · Viewed 24.4k times · Source

I am working on a project in Android studio. Suddenly, auto import stopped working in android studio for Android classes, like Android.widgets.Textview, etc. In my settings, auto import is enabled. If I write import android.widget.textview, then TextView shows up in the auto import box.

Answer

Minto picture Minto · Jun 25, 2014

The problem was with android studio indexing.

Follow the steps..

Go to 'File' > 'Invalidate caches/restart'

Now the studio will shut down and restart. Now indexing begins. On completion of indexing you will find the Suggestion boxes with every possible suggestions.