您的位置:首页 > 编程语言 > Java开发

Gradle 构建的时候出现了如下错误: java.io.IOException: Could not delet folder "xxx"

2018-03-13 11:34 453 查看
AndroidStudio Gradle 构建的时候出现了如下错误

Error:Execution failed for task ‘:app:processDebugResources’.

java.io.IOException: Could not delete folder C:\Users\xxx\AndroidStudioProjects\MyApplication\app\build\xxx

如何解决:

1 .
你可以尝试删除文件路径下的文件夹


2 . 如果你的项目构建采用的JDK是java8,你应该在module下的
build.gradle
中添加如下代码

android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}


File 目录下 点击 Invalidate Cache & Restart

To all the viewers visiting this page, as per my recent experience, 'Invalidate Cache & Restart' solves the problem. No need to disable/enable instant run and deleting folders manually. (Android Studio 3.0.1)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐