android studio編譯打包時出錯
Error:Exception failed for task':accountms:clean'.
>Unable to delete file:
解決方法
1、下載lockhuntersetup.exe,直接百度就有下載
2、在build.gradle中寫一段代碼
task clean(type: Exec) { ext.lockhunter = '\"F:\\androidworkspace\\lockhuntersetup.exe\\"' def buildDir = file(new File("build")) commandLine 'cmd', "$lockhunter", '/delete', '/silent', buildDir }
位置和android {}是同等級的
然後正常編譯