title: Android update causing error: Error:java.nio.file.AccessDeniedException: /home/path/.android/build-cache.lock
body: <p>Updated Android Studio from version 2.3 to 3.1 Canary. But there seems to be a huge problem with <code>Gradle</code>. </p>
  
  <blockquote>
    <p>Error:java.nio.file.AccessDeniedException:
    /home/pathname/.android/build-cache.lock</p>
  </blockquote>
  
  <p>What I did:</p>
  
  <ol>
  <li>Deleted <code>.gradle</code>, thought it will solve the issue, but not, after rebuilding the project,  <code>.gradle</code> again appears.</li>
  <li>Deleted all android related things from system (SDK, Android Studio and remaining projects) and from zero started to download Android Studio with all required packages. Still, the same problem. </li>
  <li>Changed android studio version from 3.1 canary to 3.0, also no success.</li>
  <li>Looked at this <a href="https://stackoverflow.com/questions/30749042/error-in-building-project-in-android-studio/37943687">post</a>, but didnt help.</li>
  <li>Read in some posts that this happens when Android Studio is corrupted. but I have downloaded from official site.</li>
  </ol>
  
  <p>Any ideas how to fix it? </p>