I know this question has been asked many times, but none of them solved the problem. I have a flutter project mirrored on two computers with google drive. Flutter doesnt have any problem when running the project on the computer that created the project. The problem occurs on the other computer when it pulls the project from the other computer.
Things that I have tried:
-
Deleting the build and .dart-tools directory manually, and then running
flutter clean
.
It does run with any problems. But a new error arises that flutter lacks read/write permissions forarb-dir
-
Making Window threat protection exclusions for flutter SDK and the project. Also disabling Controlled Folder Access
-
Copying the folder to another location to check if the problem was with google drive…Still the same problem.
-
Give FULL CONTROL of the project to Users and Authenticated Users
`$ flutter clean -v
[ +234 ms] Artifact Instance of ‘AndroidGenSnapshotArtifacts’ is not required, skipping update.
[ +2 ms] Artifact Instance of ‘AndroidInternalBuildArtifacts’ is not required, skipping update.
[ +2 ms] Artifact Instance of ‘IOSEngineArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘FlutterWebSdk’ is not required, skipping update.
[ +1 ms] Artifact Instance of ‘LegacyCanvasKitRemover’ is not required, skipping update.
[ +5 ms] Artifact Instance of ‘WindowsEngineArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘MacOSEngineArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘LinuxEngineArtifacts’ is not required, skipping update.
[ +1 ms] Artifact Instance of ‘LinuxFuchsiaSDKArtifacts’ is not required, skipping update.
[ +1 ms] Artifact Instance of ‘MacOSFuchsiaSDKArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘FlutterRunnerSDKArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘FlutterRunnerDebugSymbols’ is not required, skipping update.
[ +88 ms] Artifact Instance of ‘MaterialFonts’ is not required, skipping update.
[ ] Artifact Instance of ‘GradleWrapper’ is not required, skipping update.
[ ] Artifact Instance of ‘AndroidGenSnapshotArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘AndroidInternalBuildArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘IOSEngineArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘FlutterWebSdk’ is not required, skipping update.
[ ] Artifact Instance of ‘LegacyCanvasKitRemover’ is not required, skipping update.
[ ] Artifact Instance of ‘FlutterSdk’ is not required, skipping update.
[ ] Artifact Instance of ‘WindowsEngineArtifacts’ is not required, skipping update.
[ +1 ms] Artifact Instance of ‘MacOSEngineArtifacts’ is not required, skipping update.
[ +1 ms] Artifact Instance of ‘LinuxEngineArtifacts’ is not required, skipping update.
[ +2 ms] Artifact Instance of ‘LinuxFuchsiaSDKArtifacts’ is not required, skipping update.
[ +1 ms] Artifact Instance of ‘MacOSFuchsiaSDKArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘FlutterRunnerSDKArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘FlutterRunnerDebugSymbols’ is not required, skipping update.
[ ] Artifact Instance of ‘IosUsbArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘IosUsbArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘IosUsbArtifacts’ is not required, skipping update.
[ +1 ms] Artifact Instance of ‘IosUsbArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘IosUsbArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘FontSubsetArtifacts’ is not required, skipping update.
[ ] Artifact Instance of ‘PubDependencies’ is not required, skipping update.
[ +124 ms] Deleting build…
[ +17 ms] Deleting build… (completed in 3ms)
[ +18 ms] “flutter clean” took 313ms.
[ +9 ms] Flutter failed to delete a directory at “build”. The flutter tool cannot access the file or directory.
Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user.
[ +2 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _throwFileSystemException (package:flutter_tools/src/base/error_handling_io.dart:831:3)
#2 _handleWindowsException (package:flutter_tools/src/base/error_handling_io.dart:821:3)
#3 _runSync (package:flutter_tools/src/base/error_handling_io.dart:595:7)
#4 ErrorHandlingDirectory.deleteSync (package:flutter_tools/src/base/error_handling_io.dart:478:12)
#5 CleanCommand.deleteFile (package:flutter_tools/src/commands/clean.dart:130:12)
#6 CleanCommand.runCommand (package:flutter_tools/src/commands/clean.dart:54:5)
#7 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1765:12)
#8 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1389:27)
#9 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19)
#16 main (package:flutter_tools/executable.dart:90:3)
[ +267 ms] ensureAnalyticsSent: 260ms
[ ] Running 0 shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
`
Any help would be greatly apprecited, as I am really stuck now. Please do ask for more info and corrections.
Thanks
Raihan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.