title: Dart code is not running in Android Studio
body: <p><a href="https://i.stack.imgur.com/AN6u1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AN6u1.png" alt="enter image description here" /></a></p>
  <p>When I click the green button left to <code>void main</code> which says <code>Run main.dart</code> I am presented with this error message. So, how can I then run a simple Dart code from my IDE (Android Studio)?</p>
  <hr />
  <h3>Note:</h3>
  <p>This question is <strong>NOT</strong> about running a Flutter app but the Dart code. So, please don't mark it a duplicate of questions like <a href="https://stackoverflow.com/questions/66722007/dart-code-runs-in-debug-console-not-in-terminal">this</a>.</p>
  <p>I also don't want to run <code>dart main.dart</code> command.</p>