无法在 MacOSX 上的 Android Studio 之外启动 Android Emulator [英] Unable to launch Android Emulator outside of Android Studio on MacOSX

查看:33
本文介绍了无法在 MacOSX 上的 Android Studio 之外启动 Android Emulator的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将 qemu 进程固定到 Dock 后,我收到以下错误,然后退出并再次单击它.有没有办法直接从 Finder 启动模拟器,而无需先进入 Android Studio?

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]

推荐答案

似乎一些动态链接库随着新的 Android 模拟器而移动.

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.

类似于:

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

假设您要启动 64 位版本.除此之外,您可以使用以下命令行启动模拟器:

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>

请注意,在 AVD 名称中使用下划线代替空格字符.当然,使用您需要的模拟器可执行文件.

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

这篇关于无法在 MacOSX 上的 Android Studio 之外启动 Android Emulator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆