简体   繁体   中英

IntelliJ highlight everything as warning

After change env JAVA_HOME from Java11 to Java8, IntelliJ started to highlight almost every line of code in my project as warning. In pom.xml I have java 1.8 In module settings I have also java 8

https://i.stack.imgur.com/D7WfA.png

When you encounter strange issues with the IDE there are a couple of things you can do to resolve the issue without removing and reimporting the project.

  1. Using a Build System such as Gradle or Maven you can try to refresh the configuration by opening the "Gradle" or "Maven" view on the right hand side of IntelliJ and clicking Reload
  2. In the top menu, select Build -> Rebuild Project
  3. If all prior attempts fail, navigate to File -> Invalidate Caches and click Invalidate and Restart . It will force IntelliJ to re-index everything.

Those methods usually work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM