Search Everywhere not working fine in Android Studio 3

Go to File -> Invalidate Caches / Restart...

Once you have restarted the search index will be rebuilt.


Search in Android Studio is not reliable. Since so much programming really needs searching to work and work EVERY TIME (and since invalidating caches and restarting is NOT AN OPTION for each time you need to search) I have the following old-school but reliable solution:

grep

Make sure your working directory is the base directory of your project. Type:

grep -r 'pattern' .

  • To make it case insensitive, add "-i" to the command.
  • You can add a file pattern with "--include [file_pattern]", such as --include "*.java" or --include "*.xml" to speed things up.
  • You can pipe the results into a file or the less command, where you can then search the search results, ;)

And the best part? It Works!