繁体   English   中英

Android 模拟器错误消息:“PANIC:缺少‘x86’CPUS 的模拟器引擎程序。”

[英]Android Emulator Error Message: "PANIC: Missing emulator engine program for 'x86' CPUS."

我正在尝试使用 AVD 管理器运行 Android 模拟器。 这是我的 avd: http://image-upload.de/image/fnx79V/52b0d050ee.png

这就是开始时发生的情况:

http://image-upload.de/image/vGpQfa/e912d83939.png

我有一台 Macbook Pro Retina。 直接从英特尔页面安装了 Haxm 驱动程序。

没有模拟器在工作。 所有人都收到相同的“错误”消息。

运行命令(这个错误是当我使用 Homebrew 安装 Android-sdk 和 Android-platform-tools 时 | 遇到同样问题的任何人都应该删除它或查看冲突在哪里)

export ANDROID_EMULATOR_DEBUG=1 test20

emulator:Found AVD name 'test20'
emulator:Found AVD target architecture: x86
emulator:Looking for emulator-x86 to emulate 'x86' CPU
emulator:Probing program: ./emulator-x86
emulator:Probing path for: emulator-x86
emulator:Found target-specific emulator binary: /usr/local/bin/emulator-x86
emulator:Probing for: /usr/local/bin/libOpenglRender.dylib
emulator:Probing for: /usr/local/bin/lib/libOpenglRender.dylib
emulator:Probing for: /usr/local/lib/libOpenglRender.dylib
emulator:Probing for: /usr/local/bin/lib64OpenglRender.dylib
emulator:Probing for: /usr/local/bin/lib/lib64OpenglRender.dylib
emulator:Probing for: /usr/local/lib/lib64OpenglRender.dylib
emulator:Could not find OpenGLES emulation host libraries!
emulator: ERROR: This AVD's configuration is missing a kernel file!!

emulator -avd test21
emulator:Found AVD name 'test21'
emulator:Found AVD target architecture: x86_64
emulator:Looking for emulator backend for x86_64 CPU
emulator:Probing program: ./emulator-x86_64
emulator:Probing path for: emulator-x86_64
emulator:Looking for emulator-x86 to emulate 'x86_64' CPU
emulator:Probing program: ./emulator-x86
emulator:Probing path for: emulator-x86
PANIC: Missing emulator engine program for 'x86_64' CPUS.

在我用 Homebrew 解决问题后:

我试了一下,发现了这个:

emulator64-x86 -avd test20
Creating filesystem with parameters:
    Size: 69206016
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 4224
    Inode size: 256
    Journal blocks: 1024
    Label: 
    Blocks: 16896
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
emulator: ERROR: Could not load OpenGLES emulation library: dlopen(lib64OpenglRender.dylib, 1): image not found
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
HAX is working and emulator runs in fast virt mode
qemu: could not load PC BIOS 'bios.bin'

对于所有遇到同样问题的人,也许这些步骤会有所帮助:

在调试模式下运行模拟器:

export ANDROID_EMULATOR_DEBUG=1 emulatorName

如果有一个看起来很奇怪的路径检查其他安装如 Homebrew 并消除冲突(卸载一个)

当库丢失时,您需要导出变量:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ANDROID_HOME/tools/lib

当出现错误“qemu: could not load PC BIOS 'bios.bin'”时,一种解决方法是使用完整路径运行模拟器:

/Applications/Android\ Studio.app/sdk/tools/emulator64-x86 -avd test20
In your case it is maybe a other path.

如果您使用的是 macOS,请将 Android SDK emulatortools目录添加到路径中:

第 1 步:就我而言,顺序很重要,首先是emulator ,然后是tools

export ANDROID_SDK=$HOME/Library/Android/sdk
export PATH=$ANDROID_SDK/emulator:$ANDROID_SDK/tools:$PATH

第 2 步:根据操作系统重新加载.bash_profile.bashrc

第 3 步:获取可用的模拟器列表: $emulator -list-avds

第 4 步:从命令行启动模拟器并将avd替换为您的模拟器名称$emulator @avd

不要忘记添加@符号。

这是使用 macOS High Sierra 10.13.4 和 Android Studio 3.1.2 测试的。

将 Android Studio 升级到 3.2 甚至升级了一些 SDK 包后,我遇到了这个问题。

原因是模拟器的路径发生了变化,所以不要使用...../Android/Sdk/tools/emulator而是使用....../Android/Sdk/emulator/emulator

以下启动 emulator-x86 的解决方法对我有用:

cd $SDK/tools; 
ln -s emulator64-x86 emulator-x86

或者在 Windows 上打开命令提示符(管理员)

cd %ANDROID_SDK_ROOT%\tools
mklink emulator64-x86.exe emulator-x86.exe

现在模拟器将从 SDK 管理器启动。

注意:在更新的版本中,模拟器位于emulators文件夹中。

导航到位于Android SDK folder / emulator的模拟器文件Android SDK folder

cd ${ANDROID_HOME}/emulator

然后键入这些命令以在没有 android studio 的情况下打开模拟器:

$ ./emulator -list-avds
$ ./emulator -avd Nexus_5X_API_28_x86

Nexus_5X_API_28_x86是我的 AVD,您需要提供您的 AVD 名称

对于 Windows 10,5.29.18:

使用命令提示符我刚进入模拟器目录:

cd C:\Android\sdk\emulator

然后输入命令:

emulator -avd Nexus_S_API_27

Nexus_S_API_27是我的自定义模拟器的名称。

否则它会滥用:

PANIC: Missing emulator engine program for 'x86' CPU.

在 Mac 上安装 Android Studio IDE android-studio-ide-173.4907809-mac.dmg并使用 studio SDK Manager 安装 SDK Tools

在此处输入图片说明

使用~/.profile~/.bash_profile添加到您的 PATH 并确保在$ANDROID_HOME/tools之前您的$PATH$ANDROID_HOME/emulator ,如下所示:

export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

alias androidemulator='emulator -avd Nexus_5X_API_28_x86'

有两个命名的emulator二进制文件。 位于$SDK/tools/emulator下,另一个位于$SDK/emulator/

  • 请确保您配置了正确的模拟器(需要将$SDK/emulator添加到您的 env PATH

我写了一个脚本来帮助我调用 avd 列表

    #!/bin/bash -e


    echo "--- $# $(PWD)"
    HOME_CURRENT=$(PWD)
    HOME_EMULATOR=/Users/pcao/Library/Android/sdk/emulator

    if [ "$#" -eq 0 ]
    then
        echo "ERROR pls try avd 23 or avd 28 " 
    fi

    if [ "$1" = "23" ]
    then
        echo "enter 23"
        cd $HOME_EMULATOR
        ./emulator -avd Nexus_5_API_23_Android6_ &
        cd $HOME_CURRENT
    fi

    if [ "$1" = "28" ]
    then
        echo "enter 28"
        cd $HOME_EMULATOR
        ./emulator -avd Nexus_5_API_28_GooglePlay_ &
        cd $HOME_CURRENT
    fi


在 macOS Mojave 10.14.5 上测试。

原因及解决方法:

我们使用sdk/tools/emulator ,我们应该使用sdk/emulator

WM-C02WM0T3HTD8:~ zgong$ emulator -avd Pixel_3_XL_API_Q_x86
PANIC: Unknown AVD name [Pixel_3_XL_API_Q_x86], use -list-avds to see valid list.
HOME is defined but there is no file Pixel_3_XL_API_Q_x86.ini in $HOME/.android/avd
(Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd, and $HOME/.android/avd)
WM-C02WM0T3HTD8:~ zgong$ emulator -avd Pixel_3_XL_API_Q
PANIC: Missing emulator engine program for 'x86' CPU.

我们可以检查模拟器位置:

WM-C02WM0T3HTD8:~ zgong$ which emulator
/Users/zgong/Library/Android/sdk/tools/emulator

我做了一堆谷歌搜索,虽然大多数答案都是关于在终端中正确设置路径,但事实证明它实际上与最新版本的 SDK 的转变有关,其中模拟器应用程序位于 /emulator 中/工具。 留在这里以防万一遇到同样的问题。

我们需要使用如下:

{sdk location}/emulator -avd {avd name}

这是真正的输出:

WM-C02WM0T3HTD8:~ zgong$ /Users/zgong/Library/Android/sdk/emulator/emulator -avd Pixel_3_XL_API_Q
pc_memory_init: above 4g size: 40000000
emulator: WARNING: UpdateCheck: Failure: Error
emulator: WARNING: UpdateCheck: failed to get the latest version, skipping check (current version '29.2.1-5889189')
emulator: WARNING: UpdateCheck: Failure: Error
WebSocketServer listening on port 55850
Qt WebEngine ICU data not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64/resources. Trying parent directory...
Qt WebEngine ICU data not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64/resources. Trying parent directory...
Qt WebEngine ICU data not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64. Trying application directory...
Qt WebEngine ICU data not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64. Trying application directory...
Installed Qt WebEngine locales directory not found at location /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /Users/zgong/Library/Android/sdk/emulator/lib64/qt/libexec/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
Installed Qt WebEngine locales directory not found at location /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /Users/zgong/Library/Android/sdk/emulator/lib64/qt/libexec/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
Path override failed for key ui::DIR_LOCALES and path '/Users/zgong/.QtWebEngineProcess'
Path override failed for key ui::DIR_LOCALES and path '/Users/zgong/.QtWebEngineProcess'
Qt WebEngine resources not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64/resources. Trying parent directory...
Qt WebEngine resources not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64. Trying application directory...
Qt WebEngine resources not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64/resources. Trying parent directory...
Qt WebEngine resources not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64. Trying application directory...
[0403/154905.171893:WARNING:resource_bundle_qt.cpp(116)] locale_file_path.empty() for locale
[0403/154905.171871:WARNING:resource_bundle_qt.cpp(116)] locale_file_path.empty() for locale
Qt WebEngine ICU data not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64/resources. Trying parent directory...
Qt WebEngine ICU data not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64. Trying application directory...
Installed Qt WebEngine locales directory not found at location /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /Users/zgong/Library/Android/sdk/emulator/lib64/qt/libexec/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
Path override failed for key ui::DIR_LOCALES and path '/Users/zgong/.QtWebEngineProcess'
Qt WebEngine resources not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64/resources. Trying parent directory...
Qt WebEngine resources not found at /Users/joshuaduong/qt-build-5.12.1/install-darwin-x86_64. Trying application directory...
[0403/154907.393116:WARNING:resource_bundle_qt.cpp(116)] locale_file_path.empty() for locale

参考: https : //www.reddit.com/r/androiddev/comments/a978kx/mac_can_run_emulator_fine_through_android_studio/

在我的情况下,通过执行which emulator它返回$ANDROID_HOME/tools/emulator但它应该是$ANDROID_HOME/emulator/emulator

所以我只是在 PATH 变量中的$ANDROID_HOME/tools之前添加了$ANDROID_HOME/emulator并且它现在工作正常

在 WINDOWS 上 - 更新系统路径对我有用。 为您的 sdk 位置创建一个名为ANDROID_SDK的环境变量,然后按以下顺序将它们添加到您的路径中:

%ANDROID_SDK%\emulator
%ANDROID_SDK%\platform-tools
%ANDROID_SDK%\tools
%ANDROID_SDK%\tools\bin

您也可以尝试这里的建议: https : //www.stkent.com/2017/08/10/update-your-path-for-the-new-android-emulator-location.html

简而言之,从sdk/emulator文件夹运行sdk/emulator

就我而言,我需要从 Sdk 管理器安装 Android Emulator 并修复它

在此处输入图片说明

在我的情况下,这就像一个魅力:

  1. 打开终端

  2. 类型: open ~/.bash_profile

  3. 添加以下几行:

     export ANDROID_SDK=$HOME/Library/Android/sdk export PATH=$ANDROID_SDK/emulator:$PATH export PATH=$ANDROID_SDK/tools:$PATH export PATH=$ANDROID_SDK/tools/bin:$PATH export PATH=$ANDROID_SDK/platform-tools:$PATH export ANDROID_SDK_ROOT=$ANDROID_SDK export ANDROID_AVD_HOME=$HOME/.android/and alias emulator='$ANDROID_SDK/emulator/emulator'
  4. 保存(点击Command+S )。 您可以关闭或不关闭窗口。

  5. 回到终端,输入: source ~/.bash_profile

  6. 显示已安装的模拟器: emulator -list-avds ,类似于:

     Pixel_2_API_29 Pixel_3a_API_29 Pixel_C_API_29
  7. 最后,运行模拟器: emulator @Pixel_2_API_29

只需按照以下特定于 mac 的步骤操作:

  1. 转到: /Users/{username}/Library/Android/sdk/emulator

  2. ./emulator -list-avds

  3. ./emulator @avdName

你不能启动 emulator-x86 目录,因为它需要专门设置 LD_LIBRARY_PATH 来找到 PC Bios 和 GPU 仿真库(这就是为什么 'emulator' 存在,它修改路径,然后调用 emulator-x86)。

你更新了第一个输出吗? 看起来“模拟器”仍在寻找“/usr/local/bin/emulator-x86”

尝试以下解决方法来启动 emulator-x86:

export LD_LIBRARY_PATH=$SDK/tools/lib:$LD_LIBRARY_PATH
$SDK/tools/emulator-x86 <your-other-options>

其中 $SDK 是您的 SDK 安装路径。 简而言之,这就是“模拟器”试图做的事情。 如果前者存在,您可能想要启动 emulator64-x86 而不是 emulator-x86。

在 Windows7 64 位上有同样的问题。 它没有丢失的原因是 sdk/tools 下的emulator-x86.exe文件。 通过使用 Android SDK 管理器删除 Android SDK 工具并重新安装来修复它。 该文件现在存在并且模拟器按预期工作。

最新 Android 工作室路径已更改。

使用以下路径定位模拟器

cd /Users/<username>/Library/Android/sdk/emulator

然后运行这个命令

./emulator -avd Pixel_2_XL_API_28

我的模拟器名称是“Pixel 2 XL API 28”

享受!

Avast Antivirus 将 emulator-arm.exe 检测为线程并由于某些原因阻止。 当您通过右键单击在病毒箱页面中添加排除项 - >“恢复并添加到排除项”时,它不会在以后的运行中解决。 要在 Avast 2015 中永久解决此问题:

设置 ->

主动保护 ->

文件系统屏蔽 ->

自定义 ->

排除然后添加线程作为排除。 然后按确定。

删除 Android SDK Tools 和 Android SDK PLatform-tools; 然后再次下载这两个包。 现在,创建一个新的模拟器并启动它; 它会起作用。 您也许可以运行旧的模拟器。

这在 macOS 上对我有用:

echo 'export PATH=$PATH:'$HOME'/Library/Android/sdk/emulator:'$HOME'/Library/Android/sdk/tools:'$HOME'/Library/Android/sdk/platform-tools' >> ~/.bash_profile
source ~/.bash_profile

首先,检查您使用which emulator获得的路径,如果您获得/usr/local/share/android-sdk/tools/emulator然后删除或重命名该模拟器(它是旧的),而是使用/usr/local/share/android-sdk/emulator/emulator这是新路径

如果您使用 Homebrew 并安装了brew cask install android-sdk android-studio那么您需要:

  1. 验证您的 .bashrc 或 .zshrc 是否设置了正确的路径:
# Remove $HOME/Library/Android paths
# The new way is to use ANDROID_SDK_ROOT
export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"
# For good measure, add old paths to be backwards compatible with any scripts or 
whatnot. And to hopefully decrease confusion:
export ANDROID_HOME=$ANDROID_SDK_ROOT
export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk-bundle
  1. 然后重新启动您的终端外壳,并检查您的路径是否符合您的预期:

    set | grep ANDROID

  2. 最后,设置正确的路径后,您通常需要安装 ndk 和一些工具:

    sdkmanager "ndk-bundle" "cmake;3.10.2.4988404" "lldb;3.1"

    并检查列表中的其他部分,例如sdkmanager --list

我也关闭了Android Studio,把$HOME文件夹下旧的Android/Sdk文件夹去掉,然后重启Studio,当它问我的Sdk去哪儿了,我粘贴了Sdk路径: /usr/local/share/android-sdk

我遇到了同样的问题并且从来没有为我工作过,除非转到模拟器文件夹,我尝试导出模拟器文件夹但对我不起作用

cd $android_home/emulator and run emulator

,最后,我在 .bashrc 文件中为命令编写了 Elias

alias emulator="$ANDROID_HOME/emulator/emulator"

点击下面的命令。 它对我有用。 Android 已将模拟器目录从/tools更改为sdk/emulator

/Users/yourusername/Library/Android/sdk/emulator/emulator -avd Pixel_API_27

对于 Ubuntu 用户

如果您遇到PANIC: Missing emulator engine program for 'x86' CPU. 这个错误

尝试从 SDK 中的 emulator 文件夹启动模拟器,如上

usama@usama-Aspire-V5-471:~/Android/Sdk/emulator$ ./emulator -avd Pixel_2_API_29

在 OSX / MacOS 上对我有用的示例(替换设备名称)

~/Library/Android/sdk/emulator/emulator @Pixel_2_API_28 -no-snapshot -wipe-data

添加一个在我的情况下可接受的最低 Android 版本的虚拟设备对我有用。 (在此之前,我曾尝试过几个最新的 Android 版本,并且一直收到Missing emulator engine program for 'x86_64' CPUS错误的Missing emulator engine program for 'x86_64' CPUS 。)

我的问题是在 VS Code 中使用集成终端。 这向我展示了不同的路径设置(因此首先显示的是工具路径而不是模拟器路径)。 您所需要做的就是使用正确的 bash 更改全局 vscode 设置,如下所述: https ://stackoverflow.com/a/53971796/3437868

该问题源于 SDK 更改,因为emulator现在拥有自己的目录。
我没有注意到(也没有在意)运行过时的模拟器,但它仍然有效......
这是一个停滞的 SDK 迁移。 使用-verbose开关运行时:

emulator -avd Nexus_6_API_R -verbose

人们可以看到它开始恐慌的地方:

emulator:try dir C:\Android\tools
emulator:Looking for emulator-x86 to emulate 'x86' CPU
emulator:Probing program: C:\Android\tools/emulator-x86.exe
PANIC: Missing emulator engine program for 'x86' CPU.

但是没有emulator-x86.exe可用,实际的模拟器驻留在目录emulator 卸载“SDK 工具”(尝试重新安装它们时)后,该条目意外从列表中消失,留下一个空的tools目录,该目录可能会被删除并从PATH删除。

不需要也不建议使用x86_64仿真(因为这将运行停滞版本的仿真器)。 通过卸载“SDK 工具”来适应 SDK 路径更改是“答案”。 人们可能只是在PATH上用emulator替换tools ,但这会留下混乱。


为了比较,版本30.3.5.0的实际启动顺序应该是这样的:

emulator: Android emulator version 30.3.5.0 (build_id 7033400) (CL:N/A)
emulator: Found AVD name 'Nexus_6_API_R'
emulator: Found AVD target architecture: arm
emulator: argv[0]: 'emulator.exe'; program directory: 'C:\Android\emulator'

如果可能有类似的后续错误:

PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value

这意味着*.ini中的系统映像路径可能是错误的。
它有助于下载x86系统映像,然后创建一个新的模拟器。

这里的问题是由设置为“自动”时使用硬件加速 GLES 的默认 AVD 引起的。 必须编辑 AVD 并将其设置为“软件 - GLES 2.0”

设置

此消息表示 $SDK/tools/ 中缺少“emulator-x86”或“emulator64-x86”程序,或者由于某种原因无法找到。

首先,您确定您有有效的 SDK 下载/安装吗?

我正在尝试通过使用AVD Manager运行Android模拟器。 这是我的avd: http ://image-upload.de/image/fnx79V/52b0d050ee.png

这是通过开始以下操作发生的:

http://image-upload.de/image/vGpQfa/e912d83939.png

我有一台Macbook Pro Retina。 直接从intel页面安装了Haxm驱动程序。

没有仿真器正在工作。 所有人都收到相同的“错误”消息。

运行命令(此错误是我使用Homebrew安装Android-sdk和Android-platform-tools时遇到的问题|遇到相同问题的任何人都应删除此错误或查看冲突在哪里)

export ANDROID_EMULATOR_DEBUG=1 test20

emulator:Found AVD name 'test20'
emulator:Found AVD target architecture: x86
emulator:Looking for emulator-x86 to emulate 'x86' CPU
emulator:Probing program: ./emulator-x86
emulator:Probing path for: emulator-x86
emulator:Found target-specific emulator binary: /usr/local/bin/emulator-x86
emulator:Probing for: /usr/local/bin/libOpenglRender.dylib
emulator:Probing for: /usr/local/bin/lib/libOpenglRender.dylib
emulator:Probing for: /usr/local/lib/libOpenglRender.dylib
emulator:Probing for: /usr/local/bin/lib64OpenglRender.dylib
emulator:Probing for: /usr/local/bin/lib/lib64OpenglRender.dylib
emulator:Probing for: /usr/local/lib/lib64OpenglRender.dylib
emulator:Could not find OpenGLES emulation host libraries!
emulator: ERROR: This AVD's configuration is missing a kernel file!!

emulator -avd test21
emulator:Found AVD name 'test21'
emulator:Found AVD target architecture: x86_64
emulator:Looking for emulator backend for x86_64 CPU
emulator:Probing program: ./emulator-x86_64
emulator:Probing path for: emulator-x86_64
emulator:Looking for emulator-x86 to emulate 'x86_64' CPU
emulator:Probing program: ./emulator-x86
emulator:Probing path for: emulator-x86
PANIC: Missing emulator engine program for 'x86_64' CPUS.

在解决Homebrew的问题后:

我尝试了一下,发现了这一点:

emulator64-x86 -avd test20
Creating filesystem with parameters:
    Size: 69206016
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 4224
    Inode size: 256
    Journal blocks: 1024
    Label: 
    Blocks: 16896
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
emulator: ERROR: Could not load OpenGLES emulation library: dlopen(lib64OpenglRender.dylib, 1): image not found
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
HAX is working and emulator runs in fast virt mode
qemu: could not load PC BIOS 'bios.bin'

对于所有有相同问题的人,也许以下步骤会有所帮助:

在调试模式下运行仿真器:

export ANDROID_EMULATOR_DEBUG=1 emulatorName

如果存在看起来奇怪的路径,请检查其他安装程序,例如Homebrew并消除冲突(卸载一个)

当缺少库时,您需要导出变量:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ANDROID_HOME/tools/lib

当出现错误“ qemu:无法加载PC BIOS'bios.bin'”时,一种解决方法是使用完整路径运行模拟器:

/Applications/Android\ Studio.app/sdk/tools/emulator64-x86 -avd test20
In your case it is maybe a other path.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM