Reputation: 145
After IntelliJ IDEA update 2020.1 I cant find usage for some (not all) of the methods that im using. Some are highlighted and I can navigate to the place where I use those, other are not. Suggestions how to fix this ?
Upvotes: 13
Views: 19836
Reputation: 689
Nothing worked for me so my solution was to clear all code of the class I couldn't find and then perform a flutter clean => flutter pub get , which will result in making a syntax error to every location that used that class, then I would just simply re-import it.
My problem was that the folder name started in CAPS LOCK and the actual name was not, so I guess the IDE got confused.
Upvotes: 0
Reputation: 1021
I had this problem today, deleting the caches did not work.
Then I deleted the .idea
folder within the project (it's hidden) and opened the project again and its working.
Bear in mind that this will delete some of your local project configs (run configurations, selected SDK,...)
There is probably no need to delete the whole folder, just a subset...
Upvotes: 2
Reputation: 39
I wasn't able to solve the problem with the option Invalidate Caches. Instead, it was necessary to uninstall IntelliJ with all files and re-install it.
Upvotes: 0
Reputation: 126
Invalidating the caches did the trick for me when I could not find usages of methods and variables outside of the currently opened class after upgrading to IntelliJ IDEA 2021.1.
Depending on which usages can't be found, you will probably need to check the Clear file system cache and Local History option in the Invalidate Caches dialogue. After restarting IntelliJ and reopening projects, IntelliJ will rebuild those caches.
See the official documentation for information on invalidating caches: https://www.jetbrains.com/help/idea/invalidate-caches.html
Upvotes: 11