Hi, I was trying to install WPILib for Windows 10 64 bit, but I encountered an error. I think the error occurs because there is no “.gradle” folder, but I have no idea how to get it.
Here is the error:
System.UnauthorizedAccessException: Access to the path ‘C:\Users\User\ .gradle\wrapper\dists\gradle-7.3.3-bin\6a41zxkdtcxs8rphpq6y0069z’ is denied.
at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
at System.IO.Directory.CreateDirectory(String path)
at WPILibInstaller.ViewModels.InstallPageViewModel.<>c__DisplayClass40_1.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
— End of stack trace from previous location —
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
— End of stack trace from previous location —
at WPILibInstaller.ViewModels.InstallPageViewModel.InstallEverything(CancellationToken token)
at WPILibInstaller.ViewModels.InstallPageViewModel.RunInstall()
at WPILibInstaller.ViewModels.InstallPageViewModel.<>c__DisplayClass24_0.<<-ctor>g__installFunc|0>d.MoveNext()
I assume you already tried a reboot. Sometimes something grabs access. Also, if you have any 3rd party antiviruses (anything besides Windows Defender), go ahead and disable those.
Indeed, and these days Defender is surprisingly robust on its own! Though I do still recommend MalwareBytes to those who still want an additional AV. While you of course can still run into these sorts of issues, I have found false positive blocks/errors to happen less commonly, especially compared to Norton and McAfee which are practically malware themselves in my opinion.
I am a cyber security professional, though Desktop/Workstation AV is certainly not my area of expertise.