Android模拟器无法在VM

时间:2018-05-22 16:21:37

标签: android android-studio android-emulator virtual-machine avd

我在我的虚拟机中使用的是带有3.1.2版本的Android Studio。我在AVD上创建了ARM图像,并尝试使用以下命令运行它

emulator -avd Pixel_API_27 -netspeed full -netdelay none -no-snapshot -debug-init -logcat '*:v'

它可以打开模拟器,但显示黑屏。在终端日志中,我看到以下日志与崩溃的开始

 01-01 00:00:15.594 657 657 D libEGL : loaded /system/lib/egl/libGLES_android.so
01-01 00:00:16.670 657 657 D gralloc_ranchu: Emulator without host-side GPU emulation detected. Loading gralloc.default.so from /vendor/lib/hw/gralloc.default.so...
01-01 00:00:16.682 657 657 D gralloc_ranchu: gralloc.default.so not found in /vendor. Trying /system/lib/hw/gralloc.default.so...
01-01 00:00:16.729 657 657 E hwcomposer: ranchu_hw_composer hwc_open could not open framebuffer
01-01 00:00:16.752 657 657 I SurfaceFlinger: Using composer version 1.1
--------- beginning of crash
01-01 00:00:16.758 657 657 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x44 in tid 657 (surfaceflinger)
01-01 00:00:17.085 647 674 V vold : /dev/block/vold/disk:254,48: LABEL="SDCARD" UUID="1711-2E16" TYPE="vfat"
01-01 00:00:17.153 662 662 I SELinux : SELinux: Loaded file_contexts contexts from /file_contexts.
01-01 00:00:17.256 662 662 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-01 00:00:17.257 662 662 F DEBUG : Build fingerprint: 'Android/sdk_google_phone_armv7/generic:6.0/MASTER/4729342:userdebug/test-keys'
01-01 00:00:17.258 662 662 F DEBUG : Revision: '0'
01-01 00:00:17.258 662 662 F DEBUG : ABI: 'arm'
01-01 00:00:17.261 662 662 F DEBUG : pid: 657, tid: 657, name: surfaceflinger >>> /system/bin/surfaceflinger <<<
01-01 00:00:17.312 662 662 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x44
01-01 00:00:17.578 662 662 F DEBUG : r0 b6682000 r1 00000000 r2 00000000 r3 00000001
01-01 00:00:17.579 662 662 F DEBUG : r4 00000000 r5 b6682000 r6 beb6b9e8 r7 b6f7e5b0
01-01 00:00:17.579 662 662 F DEBUG : r8 00000000 r9 b65e5b2d sl b65e5c92 fp 00000000
01-01 00:00:17.579 662 662 F DEBUG : ip 00000000 sp beb6b788 lr b6f70281 pc b65e3600 cpsr 80000170
01-01 00:00:18.006 662 662 F DEBUG :
01-01 00:00:18.006 662 662 F DEBUG : backtrace:
01-01 00:00:18.007 662 662 F DEBUG : #00 pc 00001600 /system/lib/hw/hwcomposer.ranchu.so
01-01 00:00:18.007 662 662 F DEBUG : #01 pc 0002327f /system/lib/libsurfaceflinger.so
01-01 00:00:18.008 662 662 F DEBUG : #02 pc 00022d59 /system/lib/libsurfaceflinger.so
01-01 00:00:18.009 662 662 F DEBUG : #03 pc 000188df /system/lib/libsurfaceflinger.so (android::SurfaceFlinger::init()+98)
01-01 00:00:18.009 662 662 F DEBUG : #04 pc 00000e9d /system/bin/surfaceflinger
01-01 00:00:18.010 662 662 F DEBUG : #05 pc 0001733d /system/lib/libc.so (__libc_init+44)
01-01 00:00:18.010 662 662 F DEBUG : #06 pc 00000d60 /system/bin/surfaceflinger
01-01 00:00:28.838 665 665 I mediaserver: ServiceManager: 0xb604e120
01-01 00:00:28.840 665 665 I AudioFlinger: Using default 3000 mSec as standby time.
01-01 00:00:28.923 665 665 E : batterystats service unavailable!
01-01 00:00:28.927 665 665 E : batterystats service unavailable!
01-01 00:00:28.957 665 665 I CameraService: CameraService started (pid=665)
01-01 00:00:28.958 665 665 I CameraService: CameraService process starting
01-01 00:00:28.963 665 665 E : batterystats service unavailable!
01-01 00:00:28.982 665 665 E : batterystats service unavailable!
01-01 00:00:29.345 665 665 D EmulatedCamera_QemuClient: Emulated camera list: name=virtualscene channel=0 pix=876758866 dir=back framedims=640x480,352x288,320x240,176x144,1280x720,1280x960

它不断重复同样的错误。 请帮我解决这个问题。我只需要运行模拟器,因为我正在使用VM

提前致谢

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,可能与“使用主机GPU”选项有关。在勾选框模拟器设置(禁用或激活它)或选择“软件GLES 2.0”上检查它以禁用仿真性能中的主机GPU,然后重试。我希望能帮到你

相关问题