错误:任务“:app:processDebugResources"的执行失败.>java.io.IOException: 无法删除文件夹“";在安卓工作室 [英] Error:Execution failed for task ':app:processDebugResources'. > java.io.IOException: Could not delete folder "" in android studio

查看:33
本文介绍了错误:任务“:app:processDebugResources"的执行失败.>java.io.IOException: 无法删除文件夹“";在安卓工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Android Studio 开发一个 Android 应用程序,所以我创建了一个 Android 应用程序,我想发布它.每当我点击build project"获取apk文件时,我收到此错误:

I am trying to develop a Android application using Android Studio, so I created an Android app and I want to publish it. Whenever I click on "build project" to obtain the apk file, I get this error:

Error:Execution failed for task ':app:processDebugResources'.
> java.io.IOException: Could not delete folder C:\Users\ehsan\AndroidStudioProjects\MyApplication3\app\build\generated\source\r\debug\com\example\ehsan

Build.gradle:

Build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.example.ehsan.myapplication"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.0'
}

推荐答案

我猜目标构建目录中的某些文件是在您使用的另一个工具中打开的.只需在必须清理的文件夹中打开一个文件句柄.构建任务'clean'想要删除构建目录(通常是'target')中的所有文件,当它失败时,构建失败.

I guess some of the files in the target build directory is open in another tool you use. Just a file handle open in the folder which has to be cleaned. The build task 'clean' wants to delete all the files in the build directory(normally 'target') and when it fails, the build fails.

这篇关于错误:任务“:app:processDebugResources"的执行失败.>java.io.IOException: 无法删除文件夹“";在安卓工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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