Could not delete path

主宰稳场 提交于 2019-12-28 06:30:20

问题


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.

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


回答1:


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.




回答2:


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.




回答3:


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.

  1. Select all and Unlock BUTTON in application.

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



来源:https://stackoverflow.com/questions/51420868/could-not-delete-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!