Error:null value in entry: incrementalFolder=null

I am getting following error in gradle build.

Error:null value in entry: incrementalFolder=null

How can I fix this?


Solution 1:

I agree with Maravilho Singa's answer. It appears to be a bug in gradle.

I found another solution here:

removing the .gradle directory in the root project directory will fix the problem.

Solution 2:

Just delete the .gradle directory and rebuild app. Undo Try to bring back .gradle directory. There by your error will be removed.

Solution 3:

I think it has something to do with iCloud. I've found that each time that happens with my projects it's because the .gradle file had been uploaded into iCloud and was no longer available in my computer. So either delete the .gradble file and have it regenerated, or recover it from iCloud by clicking it.