title: Oops; flutter has exited unexpectedly: "Invalid argument(s)
body: <p>When I click Pub get in pubspec.yaml ana error pop up :</p>
  <pre class="lang-sh prettyprint-override"><code>Oops; flutter has exited unexpectedly: &quot;Invalid argument(s): Cannot find executable for C:\Users\Ali\flutter\bin\cache\dart-sdk\bin\pub.bat.&quot;.
  A crash report has been written to C:\Users\Ali\AndroidStudioProjects\inheritance_widgeta_context\flutter_17.log.
  </code></pre>
  <p>I have all the SDK tools updated</p>
  <p>How to solve this issue?</p>
  <p>this is the log:</p>
  <p>Flutter crash report.
  Please report a bug at <a href="https://github.com/flutter/flutter/issues" rel="nofollow noreferrer">https://github.com/flutter/flutter/issues</a>.</p>
  <h2>command</h2>
  <p><code>flutter --no-color pub get</code></p>
  <h2>exception</h2>
  <pre class="lang-sh prettyprint-override"><code>ArgumentError: Invalid argument(s): Cannot find executable for C:\Users\Ali\flutter\bin\cache\dart-sdk\bin\pub.bat.
  
  #0      _getExecutable (package:process/src/interface/local_process_manager.dart:125:5)
  #1      LocalProcessManager.start (package:process/src/interface/local_process_manager.dart:41:30)
  #2      ErrorHandlingProcessManager.start.&lt;anonymous closure&gt; (package:flutter_tools/src/base/error_handling_io.dart:462:33)
  #3      _run (package:flutter_tools/src/base/error_handling_io.dart:356:20)
  #4      ErrorHandlingProcessManager.start (package:flutter_tools/src/base/error_handling_io.dart:462:12)
  #5      _DefaultProcessUtils.start (package:flutter_tools/src/base/process.dart:477:28)
  #6      _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart:496:35)
  #7      _DefaultPub.batch (package:flutter_tools/src/dart/pub.dart:295:34)
  &lt;asynchronous suspension&gt;
  #8      _DefaultPub.get (package:flutter_tools/src/dart/pub.dart:219:15)
  #9      PackagesGetCommand._runPubGet (package:flutter_tools/src/commands/packages.dart:117:17)
  #10     PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:151:11)
  #11     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:977:18)
  #12     _rootRunUnary (dart:async/zone.dart:1198:47)
  #13     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
  #14     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
  #15     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
  #16     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
  #17     Future._completeWithValue (dart:async/future_impl.dart:529:5)
  #18     Future._asyncCompleteWithValue.&lt;anonymous closure&gt; (dart:async/future_impl.dart:567:7)
  #19     _rootRun (dart:async/zone.dart:1190:13)
  #20     _CustomZone.run (dart:async/zone.dart:1093:19)
  #21     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
  #22     _CustomZone.bindCallbackGuarded.&lt;anonymous closure&gt; (dart:async/zone.dart:1037:23)
  #23     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
  #24     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
  #25     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
  #26     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
  </code></pre>
  <h2>flutter doctor</h2>
  <pre class="lang-sh prettyprint-override"><code>[✓] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 6.1.7601], locale en-US)
      • Flutter version 1.22.6 at C:\Users\Ali\flutter
      • Framework revision 9b2d32b605 (4 weeks ago), 2021-01-22 14:36:39 -0800
      • Engine revision 2f0af37152
      • Dart version 2.10.5
  
  [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
      • Android SDK at C:\Users\Ali\AppData\Local\Android\sdk
      • Platform android-30, build-tools 30.0.3
      • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
      • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
      • All Android licenses accepted.
  
  [✓] Android Studio (version 4.0)
      • Android Studio at C:\Program Files\Android\Android Studio
      • Flutter plugin installed
      • Dart plugin version 193.7547
      • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
  
  [✓] VS Code (version 1.52.1)
      • VS Code at C:\Users\Ali\AppData\Local\Programs\Microsoft VS Code
      • Flutter extension version 3.19.0
  
  [!] Connected device
      ! No devices available
  
  ! Doctor found issues in 1 category.
  </code></pre>