Android Emulator not launching after keeping it in Dock on MacBook M3 Max

I am encountering an issue when trying to launch the Android emulator from a dock icon on macOS.
Steps to Reproduce:

  1. I launch the Android emulator successfully from the Virtual Device Manager in Android Studio.
  2. I pin the emulator’s icon to the dock while it is running.
  3. I quit the emulator.
  4. The pinned icon in the dock changes to a generic “cmd” icon with “exec” written on it.

Problem:

When I try to launch the emulator by clicking the “exec” icon in the dock, it starts but then immediately crashes with the following error:

/Users/usamasarwar/Library/Android/sdk/emulator/qemu/darwin-aarch64/qemu-system-aarch64 ; exit;
usamasarwar@Usama-Sarwar ~ % /Users/usamasarwar/Library/Android/sdk/emulator/qemu/darwin-aarch64/qemu-system-aarch64 ; exit;
dyld[8165]: Library not loaded: @rpath/libandroid-emu-tracing.dylib
  Referenced from: <4C4C4435-5555-3144-A1F0-A1498EB7DBFF> /Users/usamasarwar/Library/Android/sdk/emulator/qemu/darwin-aarch64/qemu-system-aarch64
  Reason: tried: '/Users/usamasarwar/Library/Android/sdk/lib64/qt/lib/libandroid-emu-tracing.dylib' (no such file), '/Users/usamasarwar/Library/Android/sdk/emulator/qemu/darwin-aarch64/libandroid-emu-tracing.dylib' (no such file), '/Users/usamasarwar/Library/Android/sdk/emulator/qemu/darwin-aarch64/lib64/libandroid-emu-tracing.dylib' (no such file), '/Users/usamasarwar/Library/Android/sdk/lib64/qt/lib/libandroid-emu-tracing.dylib' (no such file), '/Users/usamasarwar/Library/Android/sdk/emulator/qemu/darwin-aarch64/libandroid-emu-tracing.dylib' (no such file), '/Users/usamasarwar/Library/Android/sdk/emulator/qemu/darwin-aarch64/lib64/libandroid-emu-tracing.dylib' (no such file), '/usr/lib/libandroid-emu-tracing.dylib' (no such file, not in dyld cache)
zsh: abort      

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

What I’ve Tried:

  • I can still launch the emulator from the Virtual Device Manager in Android Studio without any issues.
  • Reinstalled the Android emulator and SDK tools.
  • Ensured that ANDROID_HOME and ANDROID_SDK_ROOT environment variables are correctly set.

Environment:

flutter doctor -v

usamasarwar@Usama-Sarwar ~ % flutter doctor -v
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale
    en-PK)
    • Flutter version 3.22.2 on channel stable at /Library/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (4 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/usamasarwar/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/usamasarwar/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/usamasarwar/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      17.0.10+0-17.0.10b1087.21-11609105)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.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
      17.0.10+0-17.0.10b1087.21-11609105)

[✓] VS Code (version 1.90.2)
    • VS Code at /Users/usamasarwar/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.90.0

[✓] Connected device (3 available)
    • macOS (desktop)                 • macos                 • darwin-arm64   •
      macOS 14.5 23F79 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         •
      macOS 14.5 23F79 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript •
      Google Chrome 126.0.6478.127

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Question:

How can I correctly configure the emulator to launch from the dock icon without encountering the libandroid-emu-tracing.dylib error?

Any help or guidance on resolving this issue would be greatly appreciated!

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật