'Intellij "cannot resolve symbol" after installing spring boot

I've recently installed the plugin "spring boot assistant" into my Intellij. When I was trying to run an old java file that I've completed before, a lot of the symbols were displayed as "cannot resolve symbol".

This is what my file looks like. enter image description here

I think this might have something to do with maven, but I dont know how to fix it since there's no errors with running the program before installing spring-boot and maven. I've just started learning spring boot so I'm still unfamiliar with the functions. Please help me.



Solution 1:[1]

Some plugins might mess up with the project settings. First of all, try to invalidate cache: File -> Invalidate Caches / Restart.... Confirm with Invalidate and Restart. It takes a while but is worth a try.

If it doesn't work your SDK is not set: Open File -> Project Structure... and navigate to Project and add a Project SDK and the Project language level you need (you might want to navigate to your SDK saved in the system instead).

enter image description here

It is also worth to try checking up the language levels:

  • File -> Project Structure... and navigate to Modules.

    Check the Language level of each module.

  • File -> Settings and navigate to Build, Execution, Deployment -> Java Compiler.

    Check the Target bytecode version of each module.

Solution 2:[2]

It seems to have issues with resolving absolutely basic Java stuff - try going into Project Structure -> Project Settings -> Project and check if you have an SDK defined for your project.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Dropout