AndroidStudio 编译过程中报错Error:Execution failed for task ':app:clean'. > Unable to delete directory: F:\app\build\intermediates


最近在编译项目时候老是不通过:报错Error:Execution failed for task ':app:clean'. > Unable to delete directory: F:\app\build\intermediates,好郁闷。

不过在网上找到了一种方法,Window系统需要在网上下载LockHunter(http://lockhunter.com/download.htm),然后就在你项目的build.gradle里面添加task clean(type:Exec){ext.lockhunter='\"C:\\LockHunter.exe\"'defbuildDir=file(newFile("build"))commandLine'cmd',"$lockhunter",'/delete','/silent',buildDir}同步即可。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容