title: Flutter - Pub failed to rename directory because access was denied
body: <p>I have installed flutter 2 on my machine, and since this morning I have been receiving this error, when I try to give flutter pub get, in my terminal, or simply flutter doctor. I found several solutions on the internet but I don't know what it can be, and none of them solved my problem. I saw it on one of the sites that may be conflicting with antivirus, but I installed my new one yesterday, and it started to give error only today.</p>
  <blockquote>
  <p>flutter doctor
  Pub failed to rename directory because access was denied.
  This may be caused by a virus scanner or having a file
  in the directory open in another application.
  Running &quot;flutter pub get&quot; in flutter_tools...
  pub get failed (1; in the directory open in another application.)</p>
  </blockquote>