The process cannot access the file because it is being used by another process.
Besides the time consuming ways: killing java.exe, rebooting, invalidate caches..
Is there any other way I can either stop this from happening, or at least fix it in a faster way?
It only happens when compiling Android on Windows, happens roughly every 2-3 minutes.