Reputation: 886
I am using IntelliJ IDEA 2018.2.5 (Community Edition). Here are the complete details.
Build #IC-182.4892.20, built on October 16, 2018
JRE: 1.8.0_152-release-1248-b19 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
I have followed all the suggested solutions in so many different answers in SO. but nothing worked for me.
Here are the screenshots of required setting that needs to be done for lombok package.
lombok
jar is available in external libraries.
I still get the error while compiling the application.
Upvotes: 23
Views: 76336
Reputation: 1
I was also facing this problem. I first disabled Lombok and restarted IntelliJ. Then enabled the Lombok plugin again from IntelliJ plugins menu , a pop-up appeared to add it to classpath. And after that it started working fine.
Upvotes: 0
Reputation: 1
I have tried all the above answers, it didn't work for me. Also I have also tried adding -Djps.track.ap.dependencies=false in so many places but not solved the problem.
Try deleting .idea folder which is inside your project and then after mvn clean install it solved the problem.
Upvotes: 0
Reputation: 41
Try to setup the scope directly. Example for maven:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
<scope>compile</scope>
</dependency>
Upvotes: 3
Reputation: 1635
for me:
Upvotes: -1
Reputation: 111
In my case, I forgot the test dependency:
testCompileOnly 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
Gradle 4.10, java1.8, Intellij Idea 2018.3.2
Upvotes: 11
Reputation: 11
I met exactly the same issue, but couldn't let it go after tried all solutions I could found in stackoverflow.
Eventually, I fixed it, by changing Preferences - Build, Execution, deployment > Build Tools > Gradle:
Build and run using: Gradle (Default) // it was Intellij IDEA
Run tests using: Gradle (Default) // it was Intellij IDEA
Gradle JVM: 11 // use 8 and above
Not sure if this is the right answer, but any of you have this issue can try. I believe it's just the IntelliJ setting caused problem.
Upvotes: 1
Reputation: 1
Check out this link: https://projectlombok.org/setup/gradle
I had the same problem and resolved it after adding lombok dependencies in build.gradle
Upvotes: -1
Reputation: 79
I had the same problem, after change git branch in intellij. The solution is:
Upvotes: 6