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?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
You need to install the Lombok plugin for IDEA. Open the Settings panel. 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!
If you are on
Mac
, make sure you enable annotation processing (tick the checkbox) at these 2 places.And then
This is my IntelliJ IDEA and Mac Version - IntelliJ IDEA 2017.1.5 Build #IU-171.4694.70 --- Mac OS X 10.12
I fixed it by ticking the "Enable annotation processing" checkbox in Settings->Compiler->Annotation Processors.
Goto Setting->Plugin->Search for "Lombok Plugin" -> It will show results. Install Lombok Plugin from the list and Restart Intellij
It's possible that you already have the
Lombok
plugin, and still the generated methods are not recognised byAndroid 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