Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto import not working for Android classes in Android studio

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.

like image 553
Minto Avatar asked Jun 25 '14 10:06

Minto


People also ask

How do you import Pydroid?

Just make sure your module is saved in the same folder first the just type From followed by the name of your module and import your function then you can just print or do what ever you want with the module. Also you can just import the whole module by importing it.


2 Answers

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.

like image 109
Minto Avatar answered Nov 08 '22 12:11

Minto


For me, the problem was that "Show import popup" was not checked at File > Settings > Editor > General > Auto Import > Java.

like image 42
Zsolt Z. Avatar answered Nov 08 '22 14:11

Zsolt Z.