2

I'm building a java project with IntelliJ IDEA 2018.1.5 (Community Edition) with the following errors: IntelliJ errors

However, if I build with ./gradlew build --x test, it is OK. I've tried all methods here, but still no luck. Any suggestions?

sinoTrinity
  • 1,125
  • 2
  • 15
  • 27
  • Use the [gralde integration in intelliJ](https://www.jetbrains.com/help/idea/gradle.html). – Turing85 Jun 21 '18 at 21:34
  • Delete `.idea` directory and reimport the project from Gradle. If the issue persists, report a bug at https://youtrack.jetbrains.com/issues/IDEA with the [idea.log](https://intellij-support.jetbrains.com/hc/articles/207241085) and the sample project to reproduce. – CrazyCoder Jun 21 '18 at 21:41
  • 1
    If you have already integrated with Gradle then you may have to invalidate your caches. To do that I believe you got to File -> invalidate caches and restart. This will force IntelliJ to reindex the project allowing it to identify symbols. – vandench Jun 21 '18 at 22:12
  • @Turing85 I tried, unfortunately it didn't work. – sinoTrinity Jun 22 '18 at 00:28
  • @CrazyCoder I tried, but it didn't work. Will report as a bug. – sinoTrinity Jun 22 '18 at 00:32
  • @vandench I tried invalidating, unfortunately it didn't work. – sinoTrinity Jun 22 '18 at 00:33

2 Answers2

2

Turn on "Preference" | "Build, Execution, Deployment" | "Compiler" | "Annotation Processors" | "Enable annotation processing".

sinoTrinity
  • 1,125
  • 2
  • 15
  • 27
1

1 - Check if Anotation Processing is enable in both 'Settings' and 'Default Settings' windows.

2 - Check if Lombok Plugin is installed and updated.

3 - Remove ALL generated folders from your project (.idea, .gradle, gradle, build, out..)

4 - Rerun Gradle Build.

This worked for me today when the Idea build was working but the Gradle run kept giving me errors.

BBacon
  • 2,456
  • 5
  • 32
  • 52