Methods and classes in Android Studio are called multiple times but are grayed out

  Some classes and methods in Android Studio have been called by other classes or methods, but they are grayed out. When you put the mouse on them, it shows: Class'XXX' is never used or Method'XXX' is never used , and when running It can run normally without any exception. The display is as follows:
Insert picture description here
clean Project invalid
solution : File—>Invalidate Caches/Restart as shown below
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_36158551/article/details/106207519