static import not working in lombok builder in intelliJ

与世无争的帅哥 提交于 2020-01-03 07:38:11

问题


I am using Lombok in IntelliJ. Though everything else is working fine when I try to do the static import of the Lombok builder, IntelliJ build project doesn't find the builder class. If you don't use static import, it works fine.


回答1:


This is a known bug, and not something that's easy to fix. Static imports are resolved before the annotation processors are run. This is a problem in javac, not lombok.

Disclosure: I am a lombok developer.




回答2:


I ran into this error, after I added the lombok dependancy.

I solved this by:
1. Installing the intellij lombok plugin.
2. Enabling annotation processing at "Settings > Build > Compiler > Annotation Processors"
3. Restart IDE.



来源:https://stackoverflow.com/questions/47674264/static-import-not-working-in-lombok-builder-in-intellij

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!