You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Considering I and (many other devs) use Windows Dev Drive to get decent build times on windows. It was quite confusing initially when i tried changing the source code and only the first change would be reflected and then the following error would show up in the dev console :
Compiler | BUILD SUCCESSFUL in 25sCompiler | 11 actionable tasks: 1 executed, 10 up-to-dateCompiler | Gradle was unable to watch the file system for changesCompiler | net.rubygrapefruit.platform.NativeException: Couldn't add watch, error = 1: D:\AndroidStudioProjects\NewzleCompiler | at net.rubygrapefruit.platform.internal.jni.AbstractNativeFileEventFunctions$NativeFileWatcher.startWatching0(Native Method)Compiler | at net.rubygrapefruit.platform.internal.jni.AbstractNativeFileEventFunctions$NativeFileWatcher.doStartWatching(AbstractNativeFileEventFunctions.java:49)Compiler | at net.rubygrapefruit.platform.internal.jni.AbstractFileEventFunctions$AbstractFileWatcher.startWatching(AbstractFileEventFunctions.java:181)Compiler | at net.rubygrapefruit.platform.internal.jni.WindowsFileEventFunctions$WindowsFileWatcher.startWatching(WindowsFileEventFunctions.java:59)Compiler | at org.gradle.internal.watch.registry.impl.HierarchicalFileWatch
...
Compiler | Exiting continuous build as Gradle does not watch any file system locations.
Turns out, Dev Drive is not supported by the Gradle File Watcher:
Network file systems like Samba and NFS are not supported. Microsoft Dev Drives (ReFS) are also not supported.
Unsupported File Systems
When enabled by default, file system watching acts conservatively when it encounters content on unsupported file systems. This can happen if you mount a project directory or subdirectory from a network drive. Gradle doesn’t retain information about unsupported file systems between builds when enabled by default. If you explicitly enable file system watching, Gradle retains information about unsupported file systems between builds.
There are two workarounds to this
Move your project into an NTFS formatted drive to allow gradle file watcher to work (tested. works!)
Force gradle file watcher to watch an unsopported file system by enabling the flag in your gradle.properties file (unlikely to work)
To force file system watching for all builds (unless disabled with --no-watch-fs), add the following value to gradle.properties:
Accordingg to my research the first workaround is the best of both worlds. I think its best to leave the .gradle i.e. the gradle cache on the Dev Drive, since it requires reading a lot of small files etc. Which windows Dev Drive is optimized for.
The JDK and the project files can remain on the C drive. They dont make a big difference since they get loaded into the memory the very first time anyway.
Considering I and (many other devs) use Windows Dev Drive to get decent build times on windows. It was quite confusing initially when i tried changing the source code and only the first change would be reflected and then the following error would show up in the dev console :
Turns out, Dev Drive is not supported by the Gradle File Watcher:
There are two workarounds to this
gradle.properties
file (unlikely to work)source
The text was updated successfully, but these errors were encountered: