Java compilation sometimes fails to recognize keyword this


(Jason Patel) #1

Hi, I am relatively new to gradle, but am working of an existing implementation in my organization. For one of our projects which utilizes gradle, the build will fail, claiming that the compiler could not recognize the variable “this”, which as I am sure you all know, is a keyword in java.

cannot find symbol symbol : variable this

What’s even odder is that if i try to run the exact same build again right after the first failure it will go through fine the second time. Any ideas what could be causing this?


(Merlyn Albery-Speyer) #2

Yikes. That’s not good, computerwiz0911. Can you post your build.gradle, or a fragment that causes this issue? Also, what’s the output of gradle -v when you run it?


(Luke Daley) #3

Hi computerwiz0911,

Due to lack of response, I’m going to close this one off. But if you’re still having this issue then please just post a reply here and I’ll gladly open it back up.