4

Intellij doesn't recognize @SLF4J annotation. I have the following error:

Error:(105, 9) java: cannot find symbol
symbol:   variable log
location: class com.xxxxx.SdsConfig

knowing that I have already Enable annotation processing (Settings -> Compiler -> Annotation Processors)

I use java 8 compiler.

youssef Liouene
  • 823
  • 5
  • 14
  • 27

3 Answers3

5

Use lombok plugin for Intellij:

https://plugins.jetbrains.com/plugin/6317

This will highlight everything correctly and allow you to use auto completion for generated methods.

Note that some features (like @val) are supported in Intellij 14.1 and newer.

František Hartman
  • 13,638
  • 2
  • 38
  • 57
2

In Intellij version 2016, 2017, the enabling of

Preferences -> Compiler -> Annotation Processors

did not work for me.

The following additional checkbox did help: enter image description here

Tim Long
  • 1,936
  • 1
  • 21
  • 24
1

I had this problem when I upgraded to IntelliJ 2016.

I already had the Lombok plugin installed and Annotation Processors enabled.

I had to download a Lombok plugin from https://plugins.jetbrains.com/plugin/6317-lombok-plugin (0.15.16, as the most recent 0.15.17.2 wasn't compatible), then install it as a plugin to upgrade the installed Lombok plugin, then restart IntelliJ

Lydia Ralph
  • 1,385
  • 1
  • 18
  • 31