gpt4 book ai didi

java - 错误 :Execution failed for task ':app:processDebugResources' . > java.io.IOException:无法在 android studio 中删除文件夹 ""

转载 作者:太空狗 更新时间:2023-10-29 14:44:06 24 4
gpt4 key购买 nike

我正在尝试使用 Android Studio 开发 Android 应用程序,所以我创建了一个 Android 应用程序并想发布它。每当我单击“构建项目”以获取 apk 文件时,我收到此错误:

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

Screenshot showing the error message

构建.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'
}

最佳答案

react native

从你的 react native 文件夹运行:

cd android && gradlew clean

然后

cd .. && react-native run-android

Notes:

For mac you may need to change gradlew to ./gradlew

For the command prompt you may need to change the && to &

For powershell you may need to change the && to ; and gradlew to .\gradlew.bat

Each command can also be run individually like so cd android then gradlew clean then cd .. then react-native run-android

关于java - 错误 :Execution failed for task ':app:processDebugResources' . > java.io.IOException:无法在 android studio 中删除文件夹 "",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42758755/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com