Could not create parent directory for lock file

Viewed 28336

Error: Failed to complete Gradle execution.

Cause:

Could not create parent directory for lock file C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin\wrapper\dists\gradle-3.3-all\55gk2rcmfc6p2dg9u9ohc3hw9\gradle-3.3-all.zip.lck

6 Answers

For me worked:

In Intellij project folder :

  • delete .idea folder
  • temporary delete gradlew file

Keep it in recycle bin!

Close Ide, then open the project ( it might not work )

Close again, then restore the gradle file / .idea folder.

Message in event log: enter image description here

It shall sync download and work: enter image description here

I am new to android studio in Mac. This error causing by the folder .gradle is not granted the appropriated right to start working. So open the "get info" and give it all the "Read & write", don't forget to choose "Apply to enclosed items". Hope it help someone !

Remember to active "Apply to enclosed items"

  1. Remove the .gradle file (C:\Users\yourname.gradle)
  2. Reinstall the gradle file (create environmental variables path).
  3. Ensure that .gradle file is created properly After that open the android studio run as administration.. it won't show the error

I did hours of research and I discovered that the localhost:8080 on my program had never fully detached last time I stopped running the program. The program refused to start because really it never stopped from last time. Detach you localhost. If you don't know how just restart the computer--it will detach everything

You can see if your project folder have the permissions set to write and execute. If not, this might work:

sudo chmod 777 path/to/your/projectfolder
Related