Error occur when running react-native app that - Error resolving plugin [id: 'com.facebook.react.settings']

I am posting code and error that occur

error occur in terminal :-  FAILURE: Build failed with an exception.

* Where:
Settings file 'F:\nodejsproject\lil\android\settings.gradle' line: 2

* What went wrong:
Error resolving plugin [id: 'com.facebook.react.settings']
> java.io.UncheckedIOException: Could not move temporary workspace (F:\nodejsproject\lil\android\.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10-e343828c-2860-4ef6-b5db-6b75a1938fe4) to immutable location (F:\nodejsproject\lil\android\.gradle\8.8\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10)

* Try:
> 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.
> Get more help at https://help.gradle.org.

BUILD FAILED in 10s

setting.gredle code:-

pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }

plugins { id("com.facebook.react.settings") }

extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }

rootProject.name = 'lil'

include ':app'

includeBuild('../node_modules/@react-native/gradle-plugin')
1 Like

Please at least do a minimal research before asking questions. Not doing so is one of the main characteristics of a help vampire. If you did, you would have found many threads regarding this issue here and on the community Slack already and in the end the two issues "Immutable workspace contents have been modified" failure when workspace contents are not modified · Issue #28475 · gradle/gradle · GitHub and Temporary workspace cannot be moved to immutable location when files left open on Windows · Issue #27844 · gradle/gradle · GitHub so you probably need to downgrade Gradle or disable your anti-virus on those directories. See the issues for more information.