## The problem
Issue gradle/gradle#28475 (closed, 59 comments): ### Current Behavior A build can fail with `Immutable workspace contents have been modified` without any modification of the directory in question. ### Expected Behavior This error should only occur when files in the workspace have been modified directly or by a non-Gradle process. ### Context (optional) A few users have reported having builds fail with `Immutable workspace contents have been modified` on CI, where it is very unlikely that these workspace files have been directly modified. Instead, it appears that some scenario driven by Gradle can produce this error.

## The fix
'Immutable workspace contents have been modified' failing on CI where nothing actually changed is often a stale workspace state rather than a real modification. One reporter cleared it with a clean rebuild: cd android, gradlew clean, then rebuild (npx react-native run-android in their case). Try that before investigating file watchers.

## Notes
Thread: https://github.com/gradle/gradle/issues/28475. Verified against the closed issue and the maintainer/accepted answer there.