Home » Android » macos – Unable to launch Android Emulator outside of Android Studio on MacOSX

macos – Unable to launch Android Emulator outside of Android Studio on MacOSX

Posted by: admin June 15, 2020 Leave a comment

Questions:

I am getting the following error after I pinned qemu process to the dock then quit and click on it again. Is there a way to launch the emulator directly from the Finder without going first to Android Studio?

   /Users/johnny/Develop/android/sdk/tools/qemu/darwin-x86_64/qemu-system-x86_64 ; exit;
    dyld: Library not loaded: libQt5Widgets.5.dylib
      Referenced from: /Users/johnny/Develop/android/sdk/tools/qemu/darwin-x86_64/qemu-system-x86_64
      Reason: image not found
    [1]    48616 trace trap  /Users/johnny/Develop/android/sdk/tools/qemu/darwin-x86_64/qemu-system-x86_6

    [Process completed]
How to&Answers:

Seems like some dynamically linked libraries were moved around with the new Android emulator.

All you need to do is: add the folder with the libraries to the search path before you launch the emulator from command line.

Something like:

export DYLD_LIBRARY_PATH="<path to your SDK>/tools/lib64:<path to your SDK>/tools/lib64/qt/lib:$DYLD_LIBRARY_PATH"

Assuming that you want to launch the 64 bit version. Apart from that you can launch the emulator using this command line:

emulator64-x86 -avd <name_of_your_AVD_file>

Just mind that instead of space characters use underscore in the AVD name. And of course use the emulator executable which one you need.