Mac和"PANIC:缺少用于'arm'CPU的仿真器引擎程序". [英] Mac and "PANIC: Missing emulator engine program for 'arm' CPU."

查看:141
本文介绍了Mac和"PANIC:缺少用于'arm'CPU的仿真器引擎程序".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Galaxy Nexus上运行为API 16创建的AVD:

I am attempting to run an AVD I have created for API 16 on a Galaxy Nexus:

emulator @Galaxy_Nexus_Jelly_Bean_API_16

出现错误

PANIC:缺少用于"ARM" CPU的仿真器引擎程序.

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

尝试通过从Android Studio中的AVD管理器中按下播放按钮来启动它,会在工具坞中短暂地弹跳一些东西,但是它很快消失了,没有任何显示,也没有明显的错误消息.

Attempting to start it by pressing the play button from the AVD Manager inside Android Studio bounces something briefly in the tool dock, but it quickly vanishes and nothing shows up and there are no obvious error messages.

我浏览了其他类似问题的帖子.大多数人将Windows上的Avast称为问题所在.我在Mac上运行.我没有安装Avast.

I have looked through other posts with similar problems. Most cite Avast on Windows as causing the issue. I am running on a Mac. I do not have Avast installed.

AVD具有以下配置:

The AVD has the following configuration:

Name: Galaxy_Nexus_Jelly_Bean_API_16
CPU/ABI: Google APIs ARM (armeabi-v7a)
Path: /Users/prisoner/.android/avd/Galaxy_Nexus_API_16.avd
Target: google_apis [Google APIs] (API level 16)
Skin: galaxy_nexus
SD Card: 100 MB
hw.dPad: no
hw.lcd.height: 1280
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: Galaxy Nexus
vm.heapSize: 80
skin.dynamic: yes
hw.device.manufacturer: Google
hw.lcd.width: 720
hw.gps: yes
hw.initialOrientation: Portrait
image.androidVersion.api: 16
hw.audioInput: yes
image.sysdir.1: add-ons/addon-google_apis-google-16/images/armeabi-v7a/
hw.cpu.model: cortex-a8
tag.id: google_apis
showDeviceFrame: yes
hw.camera.back: virtualscene
hw.mainKeys: no
AvdId: Galaxy_Nexus_Jelly_Bean_API_16
hw.camera.front: emulated
hw.lcd.density: 320
avd.ini.displayname: Galaxy Nexus Jelly Bean API 16
hw.arc: false
hw.gpu.mode: auto
hw.device.hash2: MD5:5c288d27461585ecc73a535555e7cf61
hw.ramSize: 1024
hw.trackBall: no
PlayStore.enabled: false
fastboot.forceColdBoot: no
hw.battery: yes
hw.cpu.ncore: 4
hw.sdCard: no
tag.display: Google APIs
runtime.network.latency: none
hw.keyboard: yes
hw.sensors.proximity: yes
disk.dataPartition.size: 800M
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes

Android Studio环境:

Android Studio environment:

Android Studio 3.1.4
Build #AI-173.4907809, built on July 23, 2018
JRE: 1.8.0_152-release-1024-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

我已经在SDK Manager中安装了此版本的SDK的所有内容:

I have installed everything for this version of the SDK available in the SDK Manager:

我安装了最新版本的模拟器.我尝试卸载并重新安装它.

I have the latest version of the emulator installed. I've tried uninstalling and re-installing it.

ANDROID_HOME环境变量似乎已正确设置(它与SDK Manager中的Android SDK location相匹配.emulator程序也似乎是此家庭环境下的程序):

The ANDROID_HOME environment variable appears to be correctly set (it matches the Android SDK location in the SDK Manager. The emulator program appears to be the one under this home environment as well:


Mulan:~ prisoner$ echo $ANDROID_HOME
/Users/prisoner/Library/Android/sdk
Mulan:~ prisoner$ which emulator
/Users/prisoner/Library/Android/sdk/tools/emulator

据我所知,仿真器和特定于体系结构的仿真器也在ANDROID_HOME下:

As far as I can tell, the emulator and the architecture-specific emulators are also under ANDROID_HOME:

对于错误消息或存在的模拟器,我找不到其他地方,但是系统找不到它,或者如何解决该问题.

I'm at a loss about where else to look, either for error messages or the emulator that is there, but can't be found by the system, or how else to address the problem.

更新1 :明确指定路径.

尝试明确指定路径也不起作用:

Trying to specify the paths explicitly doesn't work either:


Mulan:~ prisoner$ /Users/prisoner/Library/Android/sdk/tools/emulator @Galaxy_Nexus_Jelly_Bean_API_16
PANIC: Missing emulator engine program for 'arm' CPU.
Mulan:~ prisoner$ /Users/prisoner/Library/Android/sdk/emulator/emulator @Galaxy_Nexus_Jelly_Bean_API_16
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-qemu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is undefined

当然,未定义ANDROID_SDK_ROOT.将其定义为与ANDROID_HOME相同的操作将执行以下操作:

Sure enough, ANDROID_SDK_ROOT isn't defined. Defining it to the same thing as ANDROID_HOME does the following:


Mulan:~ prisoner$ export ANDROID_SDK_ROOT="$ANDROID_HOME"
Mulan:~ prisoner$ /Users/prisoner/Library/Android/sdk/emulator/emulator @Galaxy_Nexus_Jelly_Bean_API_16
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-qemu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is defined (/Users/prisoner/Library/Android/sdk) but cannot find kernel file in /Users/prisoner/Library/Android/sdk/system-images/ sub directories

system-images目录下,我们看到每个API平台的目录:

Looking underneath the system-images directory, we see a directory for each API platform:


Mulan:~ prisoner$ ls ~/Library/Android/sdk/system-images/
android-16  android-19  android-23  android-26
android-17  android-21  android-24  android-27
android-18  android-22  android-25  android-28

看在android-16目录下,我们有


./default
./default/armeabi-v7a
./default/armeabi-v7a/build.prop
./default/armeabi-v7a/kernel-qemu
./default/armeabi-v7a/NOTICE.txt
./default/armeabi-v7a/package.xml
./default/armeabi-v7a/ramdisk.img
./default/armeabi-v7a/source.properties
./default/armeabi-v7a/system.img
./default/armeabi-v7a/userdata.img
./default/mips
./default/mips/build.prop
./default/mips/kernel-qemu
./default/mips/NOTICE.txt
./default/mips/package.xml
./default/mips/ramdisk.img
./default/mips/source.properties
./default/mips/system.img
./default/mips/userdata.img
./default/x86
./default/x86/build.prop
./default/x86/kernel-qemu
./default/x86/kernel-ranchu
./default/x86/NOTICE.txt
./default/x86/package.xml
./default/x86/ramdisk.img
./default/x86/source.properties
./default/x86/system.img
./default/x86/userdata.img
./google_apis
./google_apis/x86
./google_apis/x86/advancedFeatures.ini
./google_apis/x86/build.prop
./google_apis/x86/kernel-qemu
./google_apis/x86/kernel-ranchu
./google_apis/x86/NOTICE.txt
./google_apis/x86/package.xml
./google_apis/x86/ramdisk.img
./google_apis/x86/source.properties
./google_apis/x86/system.img
./google_apis/x86/userdata.img

推荐答案

在Mac上尝试并验证过,要解决此问题,您需要手动指定-kernel路径.即

Just tried and verified on my Mac, to solve this problem, you need to specify the -kernel path manually. i.e.

$ ~/Library/Android/sdk/emulator/emulator  @Galaxy_Nexus_Jelly_Bean_API_16 -kernel ~/Library/Android/sdk/system-images/android-16/default/armeabi-v7a/kernel-qemu

一些参考资料:

  1. 仿真器错误:此AVD的配置缺少内核文件

https://developer.android.com/studio/run/模拟器命令行

---编辑---

为避免每次都键入-kernel参数,还可以将~/Library/Android/sdk/system-images/android-16/default/armeabi-v7a/kernel-qemu文件复制到~/Library/Android/sdk/add-ons/addon-google_apis-google-16/images/armeabi-v7a.

To avoid typing the -kernel argument every time, you can also copy the ~/Library/Android/sdk/system-images/android-16/default/armeabi-v7a/kernel-qemu file to ~/Library/Android/sdk/add-ons/addon-google_apis-google-16/images/armeabi-v7a.

这篇关于Mac和"PANIC:缺少用于'arm'CPU的仿真器引擎程序".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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