Android Studio cannot resolve symbol but code executes correctly

前端 未结 9 2012
误落风尘
误落风尘 2020-11-27 04:06

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

相关标签:
9条回答
  • 2020-11-27 05:03

    For me worked only

    File -> Open -> and click build.gradle to reopen project

    0 讨论(0)
  • 2020-11-27 05:06

    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.

    0 讨论(0)
  • 2020-11-27 05:09

    Changing the language injection settings worked for me.

    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.

    0 讨论(0)
提交回复
热议问题