问题描述
我将qemu进程固定到扩展坞,然后退出并再次单击它时,出现以下错误.有没有一种方法可以直接从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仿真器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!