title: Failed to capture snapshot of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check
body: <p>Windows 10</p>
  
  <p>Node  version 9</p>
  
  <p>Java 1.8</p>
  
  <p>Gradle 4.3.1</p>
  
  <p>Gradle android plugin 3.0.1</p>
  
  <p>Build tools 26.0.2  (and 27.0.1 .. same result)</p>
  
  <p>gradle daemon disabled</p>
  
  <p>parallel build disabled (or so I think)</p>
  
  <p>incremental build on/off does not make a difference</p>
  
  <p>react-native 0.50.3</p>
  
  <p>Same project works on Linux.</p>
  
  <p>cleaned .gradle and .android and node_modules  multiple times.</p>
  
  <p>I suspect that there is some issue with long paths.
  Or that something is writing intermediate files into source Set directories (and that confuses gradle).
  But I cannot see any of that happening. My output build directory is outside of my source tree completely.</p>
  
  <p>My project consist of 
  app (android)
  my java library (just pure java no UI/resources)
  react-native-material-kit library (that wraps some react native stuff)
  react-native  0.50.3</p>
  
  <p>The problem appears to happen as soon as </p>
  
  <p>gradlew assembleRelease  starts working on any of the libraries (the app completes successfully).</p>
  
  <p>All works well on Linux
  Also   building debug (gradlew assembleDebug)  works no problem as well.</p>
  
  <p>So this is something, I suspect, happens when the libraries get assembled into a final APK.</p>
  
  <p>Also in the same dev environment I can build a sample react-native app no problem. So I know that the tools (java, SDK, npm, nodejs, react-native-cli) are all installed correctly and work.</p>
  
  <p>Debug trace below.</p>
  
  <pre><code>22:25:05.386 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':app:bundleReleaseJsAndAssets' is up-to-date
  
  22:25:05.389 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Implementation for task ':app:bundleReleaseJsAndAssets': org.gradle.api.tasks.Exec_Decorated@f32e30deaa37f493146aea8578d34f2a
  22:25:05.389 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Action implementations for task ':app:bundleReleaseJsAndAssets': [_BuildScript_$_run_closure1$_closure4$_closure5$_closure6$_closure7_d86c1e90c1284f3459a715e53e8c0c93@70d266f398b7f19fd876c7375745fa00, org.gradle.api.tasks.Exec_Decorated@f32e30deaa37f493146aea8578d34f2a]
  
  22:25:05.389 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Snapshotting property $1 (ABSOLUTE) for task ':app:bundleReleaseJsAndAssets'
  
  22:25:05.398 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
  
  22:25:05.398 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:bundleReleaseJsAndAssets'
  
  22:25:05.398 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :app:bundleReleaseJsAndAssets FAILED
  
  22:25:05.399 [DEBUG] 
  [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Task :app:bundleReleaseJsAndAssets'
  
  22:25:05.399 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Task :app:bundleReleaseJsAndAssets' completed
  
  22:25:05.399 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :app:bundleReleaseJsAndAssets (Thread[Task worker for ':' Thread 7,5,main]) completed. Took 0.013 secs.
  
  22:25:05.399 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.30 completed (1 worker(s) in use)
  
  22:25:05.399 [DEBUG] 
  [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: released lock on root.1.30
  
  22:25:05.399 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 7: released lock on :
  
  22:25:05.399 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 7,5,main]] finished, busy: 2.537 secs, idle: 0.151 secs
  
  22:25:05.399 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 6,5,main]] finished, busy: 0.0 secs, idle: 2.688 secs
  
  22:25:05.399 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 2,5,main]] finished, busy: 0.0 secs, idle: 2.689 secs
  
  22:25:05.399 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 3,5,main]] finished, busy: 0.0 secs, idle: 2.689 secs
  
  22:25:05.399 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 4,5,main]] finished, busy: 0.0 secs, idle: 2.689 secs
  
  22:25:05.399 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':',5,main]] finished, busy: 0.0 secs, idle: 2.689 secs
  
  22:25:05.399 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Daemon worker,5,main]] finished, busy: 0.0 secs, idle: 2.688 secs
  
  22:25:05.399 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 5,5,main]] finished, busy: 0.0 secs, idle: 2.688 secs
  
  22:25:05.402 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
  
  22:25:05.416 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 51 actionable tasks: 4 executed, 47 up-to-date
  
  22:25:05.436 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
  
  22:25:05.436 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on root.1
  
  22:25:05.436 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run build'
  
  22:25:05.450 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file content cache (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\4.3.1\fileContent)
  
  
  22:25:05.450 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file content cache (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\4.3.1\fileContent).
  
  22:25:05.455 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for task history cache (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\4.3.1\taskHistory)
  
  22:25:05.456 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache taskHistory.bin (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\4.3.1\taskHistory\taskHistory.bin)
  
  22:25:05.463 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\4.3.1\taskHistory).
  
  
  22:25:05.468 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Build Output Cleanup Cache (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\buildOutputCleanup)
  
  22:25:05.469 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache outputFiles.bin (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\buildOutputCleanup\outputFiles.bin)
  
  22:25:05.475 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Build Output Cleanup Cache (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\buildOutputCleanup).
  
  
  22:25:05.481 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
  
  
  22:25:05.482 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
  
  
  22:25:05.484 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 4 resolution results binary files in 0.003 secs
  
  22:25:05.484 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Plugin Resolution Cache (C:\Users\v\.gradle\caches\4.3.1\plugin-resolution) was closed 0 times.
  
  22:25:05.771 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Artifact transforms cache (C:\Users\v\.gradle\caches\transforms-1)
  
  
  22:25:05.771 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache results.bin (C:\Users\v\.gradle\caches\transforms-1\metadata-1.1\results.bin)
  
  
  22:25:05.772 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Artifact transforms cache (C:\Users\v\.gradle\caches\transforms-1).
  
  
  22:25:05.776 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopping 0 deployment handles
  
  
  22:25:05.777 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopped deployment handles
  
  
  22:25:05.777 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file hash cache (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\4.3.1\fileHashes)
  
  22:25:05.777 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\4.3.1\fileHashes\fileHashes.bin)
  
  
  22:25:05.782 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache resourceHashesCache.bin (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\4.3.1\fileHashes\resourceHashesCache.bin)
  
  22:25:05.782 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file hash cache 
  
  (C:\Users\v\home\devel\mine\myproj\mob\a\u1b\.gradle\4.3.1\fileHashes).
  22:25:05.788 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Generated Gradle JARs cache (C:\Users\v\.gradle\caches\4.3.1\generated-gradle-jars) was closed 0 times.
  
  
  22:25:05.788 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for artifact cache (C:\Users\v\.gradle\caches\modules-2)
  
  
  22:25:05.789 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-artifacts.bin (C:\Users\v\.gradle\caches\modules-2\metadata-2.31\module-artifacts.bin)
  
  
  22:25:05.789 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-repository.bin (C:\Users\v\.gradle\caches\modules-2\metadata-2.31\artifact-at-repository.bin)
  
  
  22:25:05.789 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-versions.bin (C:\Users\v\.gradle\caches\modules-2\metadata-2.31\module-versions.bin)
  
  
  22:25:05.789 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-metadata.bin (C:\Users\v\.gradle\caches\modules-2\metadata-2.31\module-metadata.bin)
  
  22:25:05.789 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (C:\Users\v\.gradle\caches\modules-2).
  
  
  22:25:05.794 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
  
  22:25:05.849 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: org.gradle.launcher.daemon.protocol.CloseInput@23a296ab
  22:25:05.850 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 19: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
  
  
  22:25:05.850 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Failed to capture snapshot of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.] from daemon DaemonInfo{pid=11436, address=[ae89d116-9016-43c9-872e-13aef2388b3e port:55893, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Busy, lastBusy=1511666693860, context=DefaultDaemonContext[uid=77be6ef4-c1f6-476b-991d-d421b3821dd0,javaHome=C:\Program Files\Java\jdk1.8.0_152,daemonRegistryDir=C:\Users\v\.gradle\daemon,pid=11436,idleTimeout=120000,daemonOpts=-XX:MaxPermSize=4096m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx8092m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
  
  22:25:05.850 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
  </code></pre>
  
  <p>Given that the problem happens on Windows during Release build only
  and not at debug build on Windows.  And not at debug or release build on Linux.
  And not while building release (or debug) react-native android app.
  -- I suspect that this is something to do with either
  a) directory depth
  b) React-native-material-kit library</p>
  
  <p>but I cannot seem to pin point why the problem is happening, like what it that gradle is doing that causing this error.  So hoping to get some help that would point me to start looking.</p>
  
  <p>thank you</p>