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.
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.
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.
For me, the problem was that "Show import popup" was not checked at File > Settings > Editor > General > Auto Import > Java.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With