无法在Android Studio中删除目录 [英] Unable to delete directory in Android Studio

查看:362
本文介绍了无法在Android Studio中删除目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我将Android Studio更新为2.0,运行项目时出现此错误

Today I updated my Android Studio to 2.0 and when I run my project is gives me this error

Error:Execution failed for task ':app:clean'.
> Unable to delete directory: /media/dev1/08782A6D782A5A281/workspace/gengold/GenGold/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.3/jars

这是我的build.gradle

This is my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"
    defaultConfig {
        applicationId "com.mobile.gengold"
        minSdkVersion 15
        targetSdkVersion 21
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {

    compile 'com.android.support:support-v4:21.0.2'
    compile 'com.android.support:appcompat-v7:21.0.3'
        /*compile 'com.google.android.gms:play-services-maps:6.5.+'*/
    compile 'com.google.android.gms:play-services:6.5.87'
    compile files('libs/jncryptor-1.2.0.jar')
}

我已经从该目录中删除了jar,但是它反复显示错误.还会再次创建目录.

I have deleted the jars from that directory but it shows the error repeatedly. Also it creates the directory again.

推荐答案

我有完全相同的问题.我发现的唯一临时解决方案是退出Android Studio,删除整个"build"文件夹(不仅是jar),然后再返回Android Studio进行构建.

I have exactly the same problem. The only temporary solution I've found is to exit Android Studio, delete the entire "build" folder (not only the jars), and then getting back to Android Studio to Build it.

第一次构建没有任何错误或任何警告,但是要重新构建,您需要按照与以前相同的步骤进行操作:(

The first build goes without errors or any warnings, but to rebuild again you need to follow the same steps as before :(

显然,这不是解决方案,但是问题似乎出在任何服务中,这些服务始终占用要在重建过程的清理"部分中删除的文件.

This is not a solution, obviously, but seems like the problem comes out from any service keeping occupied the files to be deleted in the "Clean" part of the rebuilding process.

Android 2.0中的NTFS文件系统似乎有问题 在

It seems there is a problem with NTFS file system in android 2.0 Check out in https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=206219

这篇关于无法在Android Studio中删除目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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