29

I selected an id in XML, mouse right click, find Usage shows no occurrence of id even Id exist in java file. And if i do the same in Mac its finding it.

So is there any cache issue or something else ?

Intrications
  • 16,782
  • 9
  • 50
  • 50
squiroid
  • 13,809
  • 6
  • 47
  • 67

5 Answers5

67

To fix the autocomplete go to:

File -> Invalidate Caches -> Restart -> Click at Invalidate and Restart

josedlujan
  • 5,357
  • 2
  • 27
  • 49
  • 2
    This answer is not related to the question although its useful in the answer context itself. Finding usage is not working even when Invalidate Cashes and Restart. There is still an issue with it – blueware Dec 18 '16 at 10:33
  • This also fixed Ctrl+Shift+F shortcut key to "Find in Path" stop working after Android Studio updated. – 林果皞 Feb 26 '18 at 09:51
  • I have to do this everytime I use find usages, what a joke, slows down coding about 1000x – 68060 Apr 20 '22 at 13:19
8

Another reason why that shortcut is not working is that, probably you GEFORCE EXPERIENCE is using that shortcut, which happened to my system: Remove that shortcut in your GEFORCE EXPERIENCE

enter image description here

I learned that from the following link:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/206845105/comments/115000444830

user1313024
  • 289
  • 4
  • 3
4

In my case I was not finding anything since I had "File name Filter" checked and I was just looking in build.gradle.

enter image description here

There are two options to resolve the problem:

1. Uncheck option "File name Filter" or,
2. Just filter to *.java or whatever type of file you want
Jorge Casariego
  • 21,948
  • 6
  • 90
  • 97
2

I was having the same problem and unfortunately @josedlujan's answer does not solve the problem.

Alternatively, you my try the Ctrl+Shift+F to certainly find what you want, also double clicking Shift will open a quick dialog to find certain keyword in the whole project.

blueware
  • 5,205
  • 1
  • 40
  • 60
0

For those who may have problems with "Auto-Complete" and "Find" functionality in IntelliJ-based IDEs:

Did you check whether the project's directories with source codes are excluded from indexing? If they are excluded, the IntelliJ-based IDEs do not index those directories' contents. As you know, you can check this by right click on your desired directories, then -> Mark Directory as -> Not Excluded.

I hope it will be helpful.

snoba
  • 153
  • 3
  • 8