title: Flutter app wont run on macOS android emulator
body: <p>I have an application which is working fine, in fact it's already been published on Google Play with no issue, the issue I'm facing is that this app does not run on MacOS simulator which same code without any changes or <code>flutter clean</code> etc. will run on WindowsOS simulator!</p>
  <p>Therefor each time I want to upgrade or test my app I have to switch to my Windows system because it does not run on MacOs.</p>
  <p>Here is the error that I'm getting when trying to run my app on MacOs with Android Studio/ VsCode</p>
  <pre><code>Launching lib/main.dart on sdk gphone64 x86 64 in debug mode...
  Running Gradle task 'assembleDebug'...
  
  
  FAILURE: Build failed with an exception.
  
  * Where:
  Script '/Users/home/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1102
  
  * What went wrong:
  Execution failed for task ':app:compileFlutterBuildDebug'.
  &gt; Process 'command '/Users/home/flutter/bin/flutter'' finished with non-zero exit value 1
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 6s
  Exception: Gradle task assembleDebug failed with exit code 1
  </code></pre>
  <p>What I've done so far to fix this issue:</p>
  <ol>
  <li>Delete my project folders such as <code>.idea , .dart_tool , android/.gradle , build</code></li>
  <li>Re-run and re generate all those folders</li>
  <li>Clear/invalidate caches</li>
  <li>Flutter clean</li>
  <li>Flutter upgrade</li>
  <li>Switch between stable and master branches of flutter</li>
  <li><strong>Completely remove and re-download flutter on my system (in new directory)</strong></li>
  <li>Running <code>flutter doctor</code> and <code>flutter doctor -v</code></li>
  </ol>
  <pre><code>$ flutter doctor -v
  [✓] Flutter (Channel stable, 2.10.3, on macOS 12.2.1 21D62 darwin-x64, locale
      en-ID)
      • Flutter version 2.10.3 at /Users/home/flutter
      • Upstream repository https://github.com/flutter/flutter.git
      • Framework revision 7e9793dee1 (11 days ago), 2022-03-02 11:23:12 -0600
      • Engine revision bd539267b4
      • Dart version 2.16.1
      • DevTools version 2.9.2
  
  [✓] Android toolchain - develop for Android devices (Android SDK version
      32.1.0-rc1)
      • Android SDK at /Users/home/Library/Android/sdk
      • Platform android-32, build-tools 32.1.0-rc1
      • Java binary at: /Applications/Android
        Studio.app/Contents/jre/Contents/Home/bin/java
      • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
      • All Android licenses accepted.
  
  [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
      • Xcode at /Applications/Xcode.app/Contents/Developer
      • CocoaPods version 1.11.2
  
  [✓] Chrome - develop for the web
      • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
  
  [✓] Android Studio (version 2021.1)
      • Android Studio at /Applications/Android Studio.app/Contents
      • Flutter plugin can be installed from:
         https://plugins.jetbrains.com/plugin/9212-flutter
      • Dart plugin can be installed from:
         https://plugins.jetbrains.com/plugin/6351-dart
      • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
  
  [✓] VS Code (version 1.65.2)
      • VS Code at /Applications/Visual Studio Code.app/Contents
      • Flutter extension version 3.36.0
  
  [✓] Connected device (3 available)
      • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 12
        (API 32) (emulator)
      • macOS (desktop)              • macos         • darwin-x64     • macOS
        12.2.1 21D62 darwin-x64
      • Chrome (web)                 • chrome        • web-javascript • Google
        Chrome 97.0.4692.99
  
  [✓] HTTP Host Availability
      • All required HTTP hosts are available
  
  • No issues found!
  </code></pre>
  <p>Basically whatever you can find on the net I've tried, yet there is no luck with fixing this issue.</p>
  <h1>Any idea?</h1>
  <h1>Update</h1>
  <p><code>pubspec.yaml</code></p>
  <pre><code>environment:
    sdk: &quot;&gt;=2.16.1 &lt;3.0.0&quot;
  
  dependencies:
    flutter:
      sdk: flutter
    flutter_localizations:
      sdk: flutter
  
    cupertino_icons: ^1.0.2
    flutter_launcher_icons: ^0.9.2
    font_awesome_flutter: ^9.2.0
    share: ^2.0.4
    video_player: ^2.2.19
    chewie: ^1.3.0
    youtube_player_flutter: ^8.0.0
    shared_preferences: ^2.0.13
    intl: ^0.17.0
    provider: ^6.0.2
    audioplayers: ^0.20.1
    change_app_package_name: ^1.0.0
  
  dev_dependencies:
    flutter_test:
      sdk: flutter
  
    flutter_lints: ^1.0.0
  
  flutter_icons:
    android: true
    ios: true
    remove_alpha_ios: true
    image_path: &quot;assets/icons/logo.png&quot;
  
  flutter:
    uses-material-design: true
  
    assets:
      - assets/icons/
      - assets/db/
      - assets/videos/
      - assets/lists/
  
    fonts:
      - family: Roboto
        fonts:
          - asset: fonts/Roboto-Regular.ttf
            style: normal
  
  flutter_intl:
    enabled: true
  </code></pre>