java: package lombok does not exist

Avhi picture Avhi · Aug 8, 2019 · Viewed 16.4k times · Source

I am using IntelliJ IDEA 2018.2.5 (Community Edition). Here are the complete details.

Build #IC-182.4892.20, built on October 16, 2018
JRE: 1.8.0_152-release-1248-b19 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

I have followed all the suggested solutions in so many different answers in SO. but nothing worked for me.

Here are the screenshots of required setting that needs to be done for lombok package. enter image description here

enter image description here enter image description here

lombok jar is available in external libraries. enter image description here

I still get the error while compiling the application. enter image description here

Project Library: enter image description here Please Do not mark as duplicate question because not even one answer from all the same type of question is working for me.

Answer

flxj picture flxj · Oct 8, 2020

I had the same problem, after change git branch in intellij. The solution is:

  1. on project panel (left side) right click on pom.xml file
  2. click on "Add as Maven Project"