I'm Using IntelliJ IDEA Ultimate 2019.2 to work on a Java w/gradle project.
When I try to run a JUnit test the Autobuild is triggered and it complains with the following message:
Auto build completed with errors
In the Problems tab I see over 100 errors, but when I click on them to investigate I can see that these are not real errors! The editor has no red squiggly anywhere and if I look into specific errors (like java: cannot find symbol) I confirm they are invalid errors.
I've tried "Invalidate Caches / Restart" and "Rebuild Project" with no luck
I tried many things, but I think the issue got resolved when I switched the Gradle "Build and run using" setting from Gradle to IntelliJ.

I'm posting this here because this is the first result in google about this issue for MAVEN (even though this question is marked for gradle). This fix comes from a humble comment here.
For some reason... this issue happens when you turn on Delegate IDE build/run actions to Maven, BEFORE you turn on > Tools > Actions on Save -> "Build Project" (A.K.A. Auto-build). Steps to fix:
Reload Maven Project and Rebuild Project)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With