app:clean 在 android studio 2.2 中执行失败 [英] Execution failed for app:clean in android studio 2.2

查看:32
本文介绍了app:clean 在 android studio 2.2 中执行失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前切换到 android studio 2.2,但遇到了一个大问题.当我构建项目以在模拟器上部署时出现此错误:

I currently switch to android studio 2.2 and I have a big problem. when I build project to deploy on emulator I got this error:

Error:Execution failed for task ':app:clean'.
> Unable to delete directory: /mnt/D/Document/WorkSpace/Android/Test/app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.0.0/jars

我清理了那条路径,它再次告诉我:

I clean that path and again it tell me that:

Error:Execution failed for task ':app:clean'.
> Unable to delete directory: /mnt/D/Document/WorkSpace/Android/Test/app/build/intermediates/exploded-aar/com.android.support/cardview-v7/25.0.0/jars

我一次又一次地清洁它:

I clean it handy and again:

Error:Execution failed for task ':app:clean'.
> Unable to delete directory: /mnt/D/Document/WorkSpace/Android/Test/app/build/intermediates/exploded-aar/com.android.support/support-compat/25.0.0/jars/libs

我不知道存在多少步骤,如果我通过所有这些步骤,可能是我精神上的问题!我在 android 1.4 中没有这些问题.这是关于 android studio 的错误还是与我的系统(Arch Linux)有关?提前致谢.

I don't know how many steps exists and if I pass all these steps, may be I mentally! I don't have these issues in android 1.4. is this a bug about android studio or related to my system(Arch Linux)? Thanks in advance.

推荐答案

我终于修好了!之后:

apply plugin: 'com.android.application'

在 build.gradle(Module: app) 文件中加入这行代码:

add this line of code to build.gradle(Module: app) file:

task clean(type: Delete) {
    delete rootProject.buildDir
}

它将从构建目录中删除所有 jar 和 lib 文件.希望喜欢:)

it will delete all jar and lib files from build your directory. hope to enjoy :)

这篇关于app:clean 在 android studio 2.2 中执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆