Could not find matching constructor for: java.io.File(File)

Daemon will be stopped at the end of the build
[stderr] FAILURE: Build failed with an exception.
[stderr] * Where:
[stderr] Script ‘/home/expo/workingdir/build/node_modules/react-native/react.gradle’ line: 41
[stderr] * What went wrong:
[stderr] A problem occurred configuring project ‘:app’.
[stderr] > Could not find matching constructor for: java.io.File(File)
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 40s