I installed lombok from 'Preferences -> Plugin', but it's not working when I am trying to generate Getter & Setter. My code doesn't recognize it.
Is there anyone having idea how to setup lombok and use it to generate getter & setter annotation?
You need not only to install Lombok Plugin
, but also add dependency to build.gradle
:
dependencies{
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12' //or v. 1.16.2 in your case.
}
More info on official guide.
Another answer with instructions.