title: How to fix "flutter has exited unexpectedly"
body: <p>I am developing an app using flutter on macOS. When i switch to windows machine for developing, it shows the following error</p>
  
  <p>Oops; flutter has exited unexpectedly.
  Sending crash report to Google.
  Crash report sent (report ID: 4c15631f67927e73)
  Crash report written to D:\hcbmobile\flutter_11.log;
  please let us know at <a href="https://github.com/flutter/flutter/issues" rel="nofollow noreferrer">https://github.com/flutter/flutter/issues</a>.</p>
  
  <p>I have already created issue in this link: <a href="https://github.com/flutter/flutter/issues/33645" rel="nofollow noreferrer">https://github.com/flutter/flutter/issues/33645</a></p>
  
  <p>The generated log file shows the following crash report:</p>
  
  <h2>command</h2>
  
  <p>flutter run --machine -t lib\main.dart -d B3698Y11HA4122 --track-widget-creation --start-paused</p>
  
  <h2>exception</h2>
  
  <p>FileSystemException: FileSystemException: Cannot open file, path = 'D:\hcbmobile.flutter-plugins' (OS Error: Access is denied.
  , errno = 5)</p>
  
  <pre><code>#0      _File.throwIfError (dart:io/file_impl.dart:643:7)
  #1      _File.openSync (dart:io/file_impl.dart:487:5)
  #2      _File.writeAsBytesSync (dart:io/file_impl.dart:612:31)
  #3      _File.writeAsStringSync (dart:io/file_impl.dart:636:5)
  #4      _LocalFile&amp;LocalFileSystemEntity&amp;ForwardingFile.writeAsStringSync (package:file/src/forwarding/forwarding_file.dart:147:16)
  #5      _writeFlutterPluginsList (package:flutter_tools/src/plugins.dart:104:17)
  #6      refreshPluginsList (package:flutter_tools/src/plugins.dart:297:24)
  #7      FlutterProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:175:5)
  &lt;asynchronous suspension&gt;
  #8      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:478:21)
  &lt;asynchronous suspension&gt;
  #9      FlutterCommand.run.&lt;anonymous closure&gt; (package:flutter_tools/src/runner/flutter_command.dart:424:33)
  &lt;asynchronous suspension&gt;
  #10     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #11     _rootRun (dart:async/zone.dart:1124:13)
  #12     _CustomZone.run (dart:async/zone.dart:1021:19)
  #13     _runZoned (dart:async/zone.dart:1516:10)
  #14     runZoned (dart:async/zone.dart:1463:12)
  #15     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #16     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:415:20)
  #17     CommandRunner.runCommand (package:args/command_runner.dart:196:27)
  &lt;asynchronous suspension&gt;
  #18     FlutterCommandRunner.runCommand.&lt;anonymous closure&gt; (package:flutter_tools/src/runner/flutter_command_runner.dart:396:21)
  &lt;asynchronous suspension&gt;
  #19     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #20     _rootRun (dart:async/zone.dart:1124:13)
  #21     _CustomZone.run (dart:async/zone.dart:1021:19)
  #22     _runZoned (dart:async/zone.dart:1516:10)
  #23     runZoned (dart:async/zone.dart:1463:12)
  #24     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #25     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
  &lt;asynchronous suspension&gt;
  #26     CommandRunner.run.&lt;anonymous closure&gt; (package:args/command_runner.dart:111:29)
  #27     new Future.sync (dart:async/future.dart:224:31)
  #28     CommandRunner.run (package:args/command_runner.dart:111:11)
  #29     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
  #30     run.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:60:20)
  &lt;asynchronous suspension&gt;
  #31     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #32     _rootRun (dart:async/zone.dart:1124:13)
  #33     _CustomZone.run (dart:async/zone.dart:1021:19)
  #34     _runZoned (dart:async/zone.dart:1516:10)
  #35     runZoned (dart:async/zone.dart:1463:12)
  #36     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #37     runInContext (package:flutter_tools/src/context_runner.dart:54:24)
  &lt;asynchronous suspension&gt;
  #38     run (package:flutter_tools/runner.dart:51:10)
  #39     main (package:flutter_tools/executable.dart:59:9)
  &lt;asynchronous suspension&gt;
  #40     main (file:///D:/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
  #41     _startIsolate.&lt;anonymous closure&gt; (dart:isolate-patch/isolate_patch.dart:298:32)
  #42     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12)
  </code></pre>
  
  <h2>flutter doctor</h2>
  
  <pre><code>[✓] Flutter (Channel dev, v1.6.6, on Microsoft Windows [Version 10.0.17134.765], locale en-US)
      • Flutter version 1.6.6 at D:\flutter
      • Framework revision e1a784ae3f (2 days ago), 2019-05-28 21:53:03 -0700
      • Engine revision 8dc3a4cde2
      • Dart version 2.3.2 (build 2.3.2-dev.0.0 e3edfd36b2)
  
  [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
      • Android SDK at C:\Users\USER\AppData\Local\Android\sdk
      • Android NDK location not configured (optional; useful for native profiling support)
      • Platform android-28, build-tools 28.0.3
      • Java binary at: D:\android\jre\bin\java
      • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
      • All Android licenses accepted.
  
  [✓] Android Studio (version 3.3)
      • Android Studio at D:\android
      • Flutter plugin version 33.3.1
      • Dart plugin version 182.5215
      • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
  
  [✓] Connected device (1 available)
      • Symphony P7 PRO • B3698Y11HA4122 • android-arm64 • Android 6.0 (API 23)
  
  • No issues found!
  </code></pre>
  
  <p>I have already tried flutter clean and flutter upgrade, but it did not work.</p>