codeodeveloper
codeodeveloper

Reputation: 141

React-native run-android fail on :app:processDebugResources

I recently added push notification to my app using react-native and since at seemingly random times I get messages such as in the added photo Execution failed for task

':app:processDebugResources'.
 java.io.IOException: Could not delete folder ..\android\app\build\generated\source\r\debug\com\facebook\drawee

the error message

Did anyone experienced something like that or has a solution?

Upvotes: 10

Views: 12169

Answers (4)

Hoque MD Zahidul
Hoque MD Zahidul

Reputation: 11949

If you are running the application in android device then go to the android director in your react native project then Delete the build folder/(Directory) then again run the project.Its work for me

The path of the build folder

YourProject/android/

Upvotes: 0

Venryx
Venryx

Reputation: 17999

So apparently the packager can cause two types of file-access errors to occur during gradle syncing and building:

1) "EPERM: operation not permitted, lstat"

2) "java.io.IOException: Could not delete path"

These are actually two separate problems -- one of them caused by the watchman npm module, and the other caused by the packager itself.

Instructions to solve them can be found here: https://stackoverflow.com/a/47420765/2441655

Upvotes: 0

nguyencse
nguyencse

Reputation: 1041

Run this command to clean project:

cd android && gradlew clean

After, run the following command to run project again:

cd .. && react-native run-android

Upvotes: 17

JohanR
JohanR

Reputation: 103

I had the same problem. I changed the permissions of the project folder and all subfolders to full access from all users, and now it seems to work!

Upvotes: 5

Related Questions