I\'m trying to rebuild my Android Studio Gradle project (containing mostly Kotlin code), but it started to throw an UnableToDeleteFileException
during the clean
I had the same problem and this worked for me:
If you are testing with a local backend (java servlet on local google app engine) the running process blocks some files. So you are not able to live deploy. So in this case you can solve this by stopping the local backend before starting clean or build. You find the option under "Run -> Stop backend".
I solved this one in my ubuntu like this.
Check for the processes running in your system(Ubuntu) like in task manager in windows.
Ubuntu terminal command to list out all processes running ----> "gnome-system-monitor"
Terminate or end the JAVA and ANDROID processes in the list.
Its works for me without any problems. Hope this helps...
I thought this is the problem with the process that are already created and Duplicated.
Some times intermediates creates problem so delete it and Rebuild project
OR
simply run cmd command - > gradlew clean
in your project folder in work space (its work for me)
I had the same error, tried multiple ways but the solution worked for me was to delete build folders from /android and /android/app directories.
run react-native run-android
worked for me.
Cleaning the project in Android studio and running again fixed the issue. May be do "Make Project" as well.