2

I was recently trying to run my flutter app. However, when I tried to do so, I got the following error:

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Application launch for 'com.[redacted]' did not return a valid pid 
nor a launch error.
No such process
Command: /usr/bin/arch -arm64e xcrun simctl launch AA375D1F-5CFC-4D1B-B367- 
4CB98488D7DA 
com.[redacted] --enable-dart-profiling
--enable-checked-mode --verify-entry-points --observatory-port=0
Error launching application on iPhone 13.

To try and fix this, I ran flutter doctor, where I got the following errors:

      See https://github.com/flutter/flutter/issues/6207 for more information

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Community Edition (version 2022.1.2)
[✓] VS Code (version 1.67.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

I have already tried uninstalling and reinstalling flutter, and I am still getting the same error. I am genuinely confused as to why this happening, and I would really appreciate some help. Thank you in advance!

shreyshrey
  • 515
  • 6
  • 20

3 Answers3

18

After running this command: $ sudo softwareupdate --install-rosetta --agree-to-license, the problem appears to have been fixed. I ran flutter doctor, and this was the output:

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Community Edition (version 2022.1.2)
[✓] VS Code (version 1.67.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

(Ignore the android issues- I intentionally did not install them).

shreyshrey
  • 515
  • 6
  • 20
  • Thanks! It works! May I know how you traced down and came up with this solution? Really curious. – xemexpress Nov 05 '22 at 23:55
  • Thank you, this worked for me, too. The linked Github issue from that error is very confusing, something the flutter devs should definitely fix. – Lennert Nov 16 '22 at 10:33
3

I was getting the same error on my mac M1. looks like,rosetta was not installed properly. Install rosetta using.

sudo softwareupdate --install-rosetta --agree-to-license
0

In my case, I have an M1, 2020 and I get the error "Downloaded executables cannot"

1- Upgrade to the latest version of flutter with

flutter upgrade

2- Then remove the bin cache files

rm -r ~/Documents/SDK/flutter/bin/cache

Run "flutter doctor" and you should be all set