第一步:
下载:http://lockhunter.com/index.htm
第二步:
在 build.gradle中设置
task clean(type: Exec) {
ext.lockhunter = '\"C:\\LockHunter.exe\"'
def buildDir = file(new File("build"))
commandLine 'cmd', "$lockhunter", '/delete', '/silent', buildDir
}
其中将ext.lockhunter中的目录替换成你下载后安装的目录
done