码迷,mamicode.com
首页 > Windows程序 > 详细

gradle clean can't delete file on Windows

时间:2019-08-31 12:35:49      阅读:117      评论:0      收藏:0      [点我收藏+]

标签:HERE   eve   http   win   box   some   type   androi   with   

Every now and again I run into a problem where cleaning my Android build folder just doesn‘t work.

You can use File Explorer, gradle, even WSL with a `sudo rm -rf app/build`, yet I am still unable to delete it.

It‘s usually a single file that gets stuck. A reboot will certainly fix it, but there is a much simpler way!

  • Press Win+R and type resmon then click OK
  • Click the CPU tab and open Associated Handles
  • Type the stuck file‘s name into the search box
  • Look for adb.exejava.exe, or some other Android related process
  • Right-click and select End Process

Now try deleting doing whatever Windows refused to do before. Coming from macOS and Linux I find this pretty silly.

If you operate with admin privileges you should be able to completely own the file system,

for better or worse. In this case, you are probably just trying to do your job and some tool got stuck.

 

原文地址

gradle clean can't delete file on Windows

标签:HERE   eve   http   win   box   some   type   androi   with   

原文地址:https://www.cnblogs.com/veviDP/p/11438522.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!