Error:Execution failed for task ':app:processDebugResources'. > java.io.IOException: Could not delete folder "" in android studio

REACT NATIVE

From your react native folder run:

cd android && gradlew clean

THEN

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


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.


Just clean your project, it works for me.

Clean task for gradle will work.