Mac 和“PANIC:‘arm’CPU 缺少仿真器引擎程序." [英] Mac and "PANIC: Missing emulator engine program for 'arm' CPU."
问题描述
我正在尝试在 Galaxy Nexus 上运行我为 API 16 创建的 AVD:
模拟器@Galaxy_Nexus_Jelly_Bean_API_16
这给出了错误
<块引用>恐慌:缺少 'arm' CPU 的模拟器引擎程序.
尝试通过按下 Android Studio 内的 AVD 管理器中的播放按钮来启动它,会在工具栏中短暂弹跳一些东西,但它很快就消失了,什么也没有出现,也没有明显的错误消息.
我浏览过其他有类似问题的帖子.大多数人认为 Windows 上的 Avast 是导致该问题的原因.我在 Mac 上运行.我没有安装 Avast.
AVD 有以下配置:
名称:Galaxy_Nexus_Jelly_Bean_API_16CPU/ABI:谷歌 API ARM (armeabi-v7a)路径:/Users/prisoner/.android/avd/Galaxy_Nexus_API_16.avd目标:google_apis [Google API](API 级别 16)皮肤:galaxy_nexusSD 卡:100 MBhw.dPad:没有硬件液晶显示器高度:1280runtime.network.speed:满hw.accelerometer: 是的hw.device.name: Galaxy Nexusvm.heapSize: 80皮肤动态:是的hw.device.manufacturer:谷歌hw.lcd.宽度:720hw.gps:是的hw.initialOrientation:纵向image.androidVersion.api: 16hw.audioInput:是的image.sysdir.1:附加组件/addon-google_apis-google-16/images/armeabi-v7a/hw.cpu.model: cortex-a8tag.id:google_apis显示设备帧:是的hw.camera.back:虚拟场景hw.mainKeys:没有AvdId:Galaxy_Nexus_Jelly_Bean_API_16hw.camera.front:模拟hw.lcd.密度:320avd.ini.displayname:Galaxy Nexus 果冻豆 API 16hw.arc:假hw.gpu.mode:自动hw.device.hash2: MD5:5c288d27461585ecc73a535555e7cf61硬件内存大小:1024hw.trackBall: 没有PlayStore.enabled: 假fastboot.forceColdBoot:没有硬件电池:是的hw.cpu.ncore:4hw.sd卡:没有tag.display:谷歌 APIruntime.network.latency:无硬件键盘:是的hw.sensors.proximity:是的disk.dataPartition.size: 800Mhw.sensors.orientation:是的avd.ini.encoding: UTF-8hw.gpu.enabled:是的
Android Studio 环境:
Android Studio 3.1.4构建 #AI-173.4907809,构建于 2018 年 7 月 23 日JRE:1.8.0_152-release-1024-b01 x86_64JVM:JetBrains s.r.o 的 OpenJDK 64 位服务器 VMMac OS X 10.12.6
我已在 SDK 管理器中安装了此版本 SDK 的所有内容:
我安装了最新版本的模拟器.我已经尝试卸载并重新安装它.
ANDROID_HOME
环境变量似乎设置正确(它与 SDK 管理器中的 Android SDK 位置
匹配.emulator
程序似乎也是这个家庭环境下的人:
据我所知,模拟器和特定于架构的模拟器也在 ANDROID_HOME
下:
我不知道在哪里寻找错误消息或存在的模拟器,但系统找不到,或者如何解决问题.
更新 1:明确指定路径.
尝试明确指定路径也不起作用:
<上一页>木兰:~囚徒$/Users/prisoner/Library/Android/sdk/tools/emulator @Galaxy_Nexus_Jelly_Bean_API_16恐慌:缺少arm"CPU 的仿真器引擎程序.木兰:~囚徒$/Users/prisoner/Library/Android/sdk/emulator/emulator @Galaxy_Nexus_Jelly_Bean_API_16模拟器:错误:此 AVD 的配置缺少内核文件!请确保文件kernel-qemu"与您的系统映像位于同一位置.模拟器:错误:ANDROID_SDK_ROOT 未定义果然没有定义ANDROID_SDK_ROOT
.将其定义为与 ANDROID_HOME
相同的内容:
查看 system-images
目录下,我们会看到每个 API 平台的目录:
查看 android-16
目录下,我们有
刚刚在我的Mac上试用验证过,要解决这个问题,需要手动指定-kernel
路径.即
$ ~/Library/Android/sdk/emulator/emulator @Galaxy_Nexus_Jelly_Bean_API_16 -kernel ~/Library/Android/sdk/system-images/android-16/default/armeabi-v7a/kernel-qemu
给你一些参考:
--- 编辑---
为避免每次都输入 -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
.
I am attempting to run an AVD I have created for API 16 on a Galaxy Nexus:
emulator @Galaxy_Nexus_Jelly_Bean_API_16
which gives the error
PANIC: Missing emulator engine program for 'arm' CPU.
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.
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.
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 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
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.
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
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.
Update 1: Specify path explicitly.
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
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
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
Looking just under the android-16
directory, we have
./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
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
Some references for you:
Emulator error: This AVD's configuration is missing a kernel file
https://developer.android.com/studio/run/emulator-commandline
--- Edit ---
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屋!