I have recently created a library Jar file that I imported in my Android project. I am able to call functions and use classes that are present in this Jar file, but Android
For me worked only
File -> Open -> and click build.gradle to reopen project
I have faced this issue when IntelliJ IDEA got closed abruptly due to OS crash.
You can do "File" -> "Invalidate Caches...", and select "Invalidate and Restart" option to fix this.
Place the cursor on any of the red underlined code and
Alt + Enter
Now select
Language Injection Settings
and a window will open as shown below.
Make sure you have the right file type selected in
ID:
field and Uncheck the options related to your error codes and click Ok
Hope this helps somebody.