Could not delete path

2019-01-15 07:43发布

I have been facing these "Could not delete path" problems for months.

To run my application, I always have to delete all my app/build files. But it is very time-consuming.

Sometimes i have to restart android studio for run my application.

Tried clean project and run. Tried clean project, build project and run. tried Invalidates caches / restart also but my app didn't run until i clear that project build folder.

These are the errors I am getting alternatively.

enter image description here

enter image description here

enter image description here

enter image description here

Can I reinstall Android Studio to solve this or is there a solution to get rid of it?

3条回答
乱世女痞
2楼-- · 2019-01-15 08:05

Most easy way to get unlock file.

  1. Download LOCKHUNTER and install in your system.

  2. Close your android studio and select your Android studio from your system drive.

  3. Select your folder, so you will get which all files is locked like image below.

enter image description here

  1. Select all and Unlock BUTTON in application.

  2. It will restart your application and have fun with android studio.

查看更多
贪生不怕死
3楼-- · 2019-01-15 08:09

You cannot delete a file or folder because it is locked by another program.

First You should check out what program is causing the problem. On superuser.com there is already related topic and there is also a solution with step to step how to do it.

I used to use Process Explorer to resolve the problem.

查看更多
叼着烟拽天下
4楼-- · 2019-01-15 08:24

you may not have permission to use the folder project try one of this solutions (maybe because of some antivirus apps or OS permissions):

  1. copy project file to another place that you are sure to have read/write permission and open that new project folder in android studio

  2. run android studio as administrator

  3. right click on project folder and get read and write permissions to your username.

查看更多
登录 后发表回答