[java] Lombok added but getters and setters not recognized in Intellij IDEA

I am using IntelliJ IDEA on ubuntu. I added lombok.jar into my project and installed the Lombok plugin for IDEA. I have access to the annotations but the getters and setters aren't generated. I get the same errors I would get if I tried accessing a getter or setter method that doesn't exist. What could I be missing?

This question is related to java intellij-idea lombok

The answer is


In my case it was migrating from idea 2017 to 2018 and Lombok plugin was already there. All I did is added "Enable annotation processing options" entering preferences and check the box


In IDEA 2019.3.3 community on mac ( catalina)

IntelliJ IDEA => preferences


Build,Execution,Deployment=>Compiler=>Annotation Processors:

Check Enable annotation Processing


You need to install the Lombok plugin for IDEA. Open the Settings panel (Ctrl + Alt + S). Search for "Plugins", then search for "Lombok" in the plugins. Find the plugin and install it. Finally, restart your IDEA. Then everything will be OK!


In my case,

  1. Lombok plugin was installed ?
  2. Annotation processor was checked ?

but still I was getting the error as lombok is incompatible and getter and setters was not recognized. with further checking I found that recently my intelliJ version got upgraded and the old Lombok plugin is not compatible.

Go to Preference -> Plugins -> Search lombok and update

OR

Go to Preference -> Plugins -> Search lombok-> Uninstall restart IDE and install again from MarketPlace

enter image description here


It is a combination of

  • Ticking the "Enable annotation processing" checkbox in Settings->Compiler->Annotation Processors.

    and

  • Install the plugin of Lombok for idea and restart for change to take effect.


i had this issue, just make sure

  1. Lombok pulgin is added.
  2. Annotation processor is ticked.
  3. In your build.gradle/ pom.xml, you have set lombok to be the annotation processor.

Eg. for gradle->

annotationProcessor 'org.projectlombok:lombok:1.18.12'

In MacBook press command+, and then go to plug-in and search for Lombok and then install it.

It will work without restarting IntelliJ IDEA IDE if doesn't work then please try with restart.

Many thanks


Actually the lombok is working (if you run the project even with the IDE red alerts, you will see the project will run without error), but the IDE is not recognizing all the resources generated by the lombok annotations. So you have to install the lombok plugin, that's all!


Goto Setting->Plugin->Search for "Lombok Plugin" -> It will show results. Install Lombok Plugin from the list and Restart Intellij


I had both the Lombok plugin installed and Annotation Processing enabled within IntelliJ and my syntax highlighting still wasn't working properly. This could have been due to the 2017 to 2018 IDEA upgrade. I was getting warnings "access exceeds rights" on private fields within classes I had used @Getter and @Setter on.

I had to uninstall the Lombok plugin, restart IntelliJ, then reinstall the plugin, and restart IntelliJ once more.

Everything is working good now.


If you are on Mac, make sure you enable annotation processing (tick the checkbox) at these 2 places.

1.) Intellij IDEA -> Preferences -> Compiler -> Annotation Processors

2.) File -> Other Settings -> Default Settings -> Compiler -> Annotation Processors

And then

3.) Intellij IDEA -> Preferences -> Plugins ->Browse Repositories-> Search for "Lombok"-> install plugin -> Apply and restart IDEA

4.) And then probably restart Intellij IDEA.

This is my IntelliJ IDEA and Mac Version - IntelliJ IDEA 2017.1.5 Build #IU-171.4694.70 --- Mac OS X 10.12


Go to settings->Plugins->Browse repositories and search for Lombok it will display the Lombok plugin also you will see the install option on the right side panel. Please install it. Then restart your intelliJ IDE. This has solved my issue.


It's possible that you already have the Lombok plugin, and still the generated methods are not recognised by Android Studio. In such case the plugin might be out of date, so the solution is to simply update it.

Preferences -> Plugins -> Lombok Plugin -> Update Plugin


  1. Go to File > Settings > Plugins.
    1. Click on Browse repositories...
    2. Search for Lombok Plugin.
    3. Click on Install plugin.
    4. Restart Android Studio.

I fixed it by following steps:

  1. Installed previous version of Idea(12.16) and start it(idea 13 was launched)
  2. then i switch on window with idea 13 (it proposed to reread some config files. I agreed and restart my IDE). And then everithing became ok with tha latest version of IDEA

Complete steps to fix or configure lombok.

1. Add dependency

<dependency>
          <groupId>org.projectlombok</groupId>
          <artifactId>lombok</artifactId>
          <version>1.18.8</version>
          <scope>provided</scope>
      </dependency>

2. Install the plugin of Lombok for ide. File > Settings > Plugins > Search (lombok) > install

3.Ticking the "Enable annotation processing" checkbox using below steps:- Settings->Compiler->Annotation Processors

4.Restart for change to take effect.


Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to intellij-idea

IntelliJ: Error:java: error: release version 5 not supported Has been compiled by a more recent version of the Java Runtime (class file version 57.0) Error: Java: invalid target release: 11 - IntelliJ IDEA IntelliJ can't recognize JavaFX 11 with OpenJDK 11 Error: JavaFX runtime components are missing, and are required to run this application with JDK 11 ERROR Source option 1.5 is no longer supported. Use 1.6 or later Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 How to configure "Shorten command line" method for whole project in IntelliJ intellij idea - Error: java: invalid source release 1.9 Failed to resolve: com.google.android.gms:play-services in IntelliJ Idea with gradle

Examples related to lombok

Adding Lombok plugin to IntelliJ project how to Call super constructor in Lombok Lombok annotations do not compile under Intellij idea how to configure lombok in eclipse luna Lombok added but getters and setters not recognized in Intellij IDEA Building with Lombok's @Slf4j and Intellij: Cannot find symbol log Lombok is not generating getter and setter Can't compile project when I'm using Lombok under IntelliJ IDEA Omitting one Setter/Getter in Lombok Is it safe to use Project Lombok?