React Native build failed while executing task > Path is not a readable directory

Viewed 844

I used Windows Subsystem for Linux, maybe this is the problem? I will be glad of any help, I will provide the information you need.

> Task :app:processDebugResources FAILED
320 actionable tasks: 1 executed, 319 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Path 'C:\Users\Username\Desktop\react-native-app\node_modules\unimodules-sensors-interface\android\build\intermediates\compiled_local_resources\debug\out' is not a readable directory.
2 Answers

Deleting the react-native-app\android\.gradle folder fixed the issue for me.

rebuild the project to solve this issue.

run the below command in the terminal to delete the .gradle file.

rm -rf android/.gradle rm -rf .gradle rm -rf ~/.gradle ./gradlew clean

github URL

Related