FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ‘:react-native-screens:clean’.
> java.io.IOException: Unable to delete directory ‘F:\react-native\AwesomeProject\node_modules\react-native-screens\android\build’
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
– F:\react-native\AwesomeProject\node_modules\react-native-screens\android\build\kotlin\compileDebugKotlin\localstate\build-history.bin
– F:\react-native\AwesomeProject\node_modules\react-native-screens\android\build\kotlin\compileDebugKotlin\localstate
– F:\react-native\AwesomeProject\node_modules\react-native-screens\android\build\kotlin\compileDebugKotlin
– F:\react-native\AwesomeProject\node_modules\react-native-screens\android\build\kotlin

问题解析:

这个错误似乎表明在删除 react-native-screens 模块的构建目录时出现了问题,可能是由于某些进程仍在使用这些文件,或者是因为目标目录的工作目录被设置在目标目录中。

尝试解决:

可以根据错误提示打开 \node_modules\react-native-screens\android\build,尝试手动删除

作者 admin

百度广告效果展示