Android模拟器无法正常运行。为什么?

时间:2017-07-11 04:59:41

标签: android-emulator

我过去2个月一直在使用Android工作室和模拟器,而且工作得很好而且速度很快。

现在,一旦我在Android工作室运行时关闭了我的笔记本电脑,我就不知道这是否是造成这种情况的原因。

现在,当我运行我的应用程序时,Android显示器变得疯狂,当我在我的设备中执行此操作时,它不会发生,仅在AVD中。

P.S。:我已经尝试重建,使缓存无效并重新启动,重新安装AVD,重新安装android studio(使用SDK完全卸载)但问题仍然存在。 (这里是日志(不是完整的logcat),设备启动就像2分钟后,早些时候曾经是10秒,然后是黑屏)

07-11 10:17:36.200 1282-1282/? W/auditd: type=2000 audit(0.0:1): initialized
07-11 10:17:36.780 1282-1282/? I/auditd: type=1403 audit(0.0:2): policy loaded auid=4294967295 ses=4294967295
07-11 10:17:36.780 1282-1282/? W/auditd: type=1404 audit(0.0:3): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
07-11 10:17:37.700 1-1/? W/init: type=1400 audit(0.0:4): avc: denied { write } for name="tracing_on" dev="debugfs" ino=28 scontext=u:r:init:s0 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0

                                 [ 07-11 10:17:37.885  1290: 1290 I/         ]
                                 debuggerd: starting


                                 --------- beginning of system
07-11 10:17:37.913 1291-1291/? I/vold: Vold 3.0 (the awakening) firing up
07-11 10:17:37.913 1291-1291/? V/vold: Detected support for: ext4 vfat
07-11 10:17:38.175 1291-1294/? D/vold: Recognized experimental block major ID 253 as virtio-blk (emulator's virtual SD card device)
07-11 10:17:38.175 1291-1294/? V/vold: /system/bin/sgdisk
07-11 10:17:38.175 1291-1294/? V/vold:     --android-dump
07-11 10:17:38.175 1291-1294/? V/vold:     /dev/block/vold/disk:253,64
07-11 10:17:38.203 1291-1294/? V/vold: DISK mbr
07-11 10:17:38.204 1291-1294/? W/vold: disk:253,64 has unknown partition table; trying entire device
07-11 10:17:38.204 1291-1294/? V/vold: /system/bin/blkid
07-11 10:17:38.204 1291-1294/? V/vold:     -c
07-11 10:17:38.204 1291-1294/? V/vold:     /dev/null
07-11 10:17:38.204 1291-1294/? V/vold:     -s
07-11 10:17:38.204 1291-1294/? V/vold:     TYPE
07-11 10:17:38.204 1291-1294/? V/vold:     -s
07-11 10:17:38.204 1291-1294/? V/vold:     UUID
07-11 10:17:38.204 1291-1294/? V/vold:     -s
07-11 10:17:38.205 1291-1294/? V/vold:     LABEL
07-11 10:17:38.205 1291-1294/? V/vold:     /dev/block/vold/disk:253,64
07-11 10:17:38.210 1291-1327/? D/vold: e4crypt_init_user0
07-11 10:17:38.210 1291-1327/? D/vold: e4crypt_prepare_user_storage for volume null, user 0, serial 0, flags 1
07-11 10:17:38.210 1291-1327/? D/vold: Preparing: /data/system/users/0
07-11 10:17:38.211 1291-1327/? D/vold: Preparing: /data/misc/profiles/cur/0
07-11 10:17:38.211 1291-1327/? D/vold: Preparing: /data/misc/profiles/cur/0/foreign-dex
07-11 10:17:38.211 1291-1327/? D/vold: Preparing: /data/system_de/0
07-11 10:17:38.211 1291-1327/? D/vold: Preparing: /data/misc_de/0
07-11 10:17:38.211 1291-1327/? D/vold: Preparing: /data/user_de/0
07-11 10:17:38.211 1291-1327/? D/vold: e4crypt_unlock_user_key 0 serial=0 token_present=0
07-11 10:17:38.211 1291-1327/? E/vold: Failed to chmod /data/system_ce/0: No such file or directory
07-11 10:17:38.211 1291-1327/? E/vold: Failed to chmod /data/misc_ce/0: No such file or directory
07-11 10:17:38.211 1291-1327/? E/vold: Failed to chmod /data/media/0: No such file or directory
07-11 10:17:38.212 1-1/? I/vdc: 200 1292 Command succeeded
07-11 10:17:38.238 1291-1294/? V/vold: /dev/block/vold/disk:253,64: LABEL="SDCARD" UUID="11EA-3E0A" TYPE="vfat" 
07-11 10:17:38.241 1329-1329/? I//system/bin/tzdatacheck: tzdata file /data/misc/zoneinfo/current/tzdata does not exist. No action required.
07-11 10:17:38.298 1333-1333/? I/qemu-props: connected to 'boot-properties' qemud service.
07-11 10:17:38.298 1333-1333/? I/qemu-props: receiving..
07-11 10:17:38.298 1333-1333/? I/qemu-props: received: qemu.sf.fake_camera=both
07-11 10:17:38.305 1333-1333/? I/qemu-props: receiving..
07-11 10:17:38.306 1333-1333/? I/qemu-props: received: ro.opengles.version=131072
07-11 10:17:38.310 1333-1333/? I/qemu-props: receiving..
07-11 10:17:38.310 1333-1333/? I/qemu-props: received: dalvik.vm.heapsize=384m
07-11 10:17:38.311 1333-1333/? I/qemu-props: receiving..
07-11 10:17:38.311 1333-1333/? I/qemu-props: received: qemu.hw.mainkeys=0
07-11 10:17:38.315 1334-1334/? I/lowmemorykiller: Using in-kernel low memory killer interface
07-11 10:17:38.317 1333-1333/? I/qemu-props: receiving..
07-11 10:17:38.317 1333-1333/? I/qemu-props: received: qemu.sf.lcd_density=480
07-11 10:17:38.322 1333-1333/? I/qemu-props: receiving..
07-11 10:17:38.322 1333-1333/? I/qemu-props: exiting (5 properties set).
07-11 10:17:38.330 1332-1332/? W/init.ranchu-cor: type=1400 audit(0.0:5): avc: denied { dac_override } for capability=1 scontext=u:r:goldfish_setup:s0 tcontext=u:r:goldfish_setup:s0 tclass=capability permissive=0
07-11 10:17:39.364 1291-1327/? D/VoldCryptCmdListener: cryptfs mountdefaultencrypted
07-11 10:17:39.367 1291-1346/? I/Cryptfs: cryptfs_check_passwd
07-11 10:17:39.368 1291-1346/? D/Cryptfs: crypt_ftr->fs_size = 1638400
07-11 10:17:39.368 1291-1346/? I/Cryptfs: Using scrypt for cryptfs KDF
07-11 10:17:39.421 1337-1337/? I/SurfaceFlinger: SurfaceFlinger is starting
07-11 10:17:39.421 1337-1337/? I/SurfaceFlinger: SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
07-11 10:17:39.421 1337-1337/? D/libEGL: Emulator has host GPU support, qemu.gles is set to 1.
07-11 10:17:39.424 1337-1337/? E/libEGL: load_driver(/system/lib/egl/libGLES_emulation.so): dlopen failed: library "/system/lib/egl/libGLES_emulation.so" not found
07-11 10:17:39.435 1337-1337/? D/libEGL: loaded /system/lib/egl/libEGL_emulation.so
07-11 10:17:39.437 1337-1337/? D/libEGL: loaded /system/lib/egl/libGLESv1_CM_emulation.so
07-11 10:17:39.475 1337-1337/? D/libEGL: loaded /system/lib/egl/libGLESv2_emulation.so

                                         [ 07-11 10:17:39.482  1337: 1337 D/         ]
                                         HostConnection::get() New Host Connection established 0xaee9b100, tid 1337


                                         [ 07-11 10:17:39.498  1337: 1337 W/         ]
                                         Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 
07-11 10:17:39.503 1337-1337/? E/SurfaceFlinger: hwcomposer module not found
07-11 10:17:39.504 1337-1337/? W/SurfaceFlinger: no suitable EGLConfig found, trying a simpler query
07-11 10:17:39.504 1337-1337/? I/SurfaceFlinger: EGL information:
07-11 10:17:39.504 1337-1337/? I/SurfaceFlinger: vendor    : Android
07-11 10:17:39.504 1337-1337/? I/SurfaceFlinger: version   : 1.4 Android META-EGL
07-11 10:17:39.504 1337-1337/? I/SurfaceFlinger: extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_ANDROID_create_native_client_buffer EGL_ANDROID_front_buffer_auto_refresh EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer EGL_ANDROID_recordable 
07-11 10:17:39.504 1337-1337/? I/SurfaceFlinger: Client API: OpenGL_ES
07-11 10:17:39.504 1337-1337/? I/SurfaceFlinger: EGLSurface: 8-8-8-8, config=0x2
07-11 10:17:39.512 1337-1337/? D/EGL_emulation: eglCreateContext: 0xaeea8480: maj 2 min 0 rcv 2
07-11 10:17:39.559 1291-1346/? I/Cryptfs: Enabling support for allow_discards in dmcrypt.
07-11 10:17:39.563 1291-1294/? D/vold: Disk at 252:0 changed
07-11 10:17:39.744 1291-1346/? I/Cryptfs: Password matches
07-11 10:17:39.745 1291-1346/? D/Cryptfs: test_mount_encrypted_fs(): Master key saved
07-11 10:17:39.747 1291-1346/? I/Cryptfs: keymaster module name is Keymaster OpenSSL HAL
07-11 10:17:39.747 1291-1346/? I/Cryptfs: keymaster version is 2
07-11 10:17:39.747 1291-1346/? I/Cryptfs: Found keymaster0 module, using keymaster0 API.
07-11 10:17:39.747 1291-1346/? D/Cryptfs: Password is default - restarting filesystem
07-11 10:17:39.748 1291-1346/? D/Cryptfs: unmounting /data succeeded
07-11 10:17:40.072 1291-1346/? D/Cryptfs: Just triggered post_fs_data
07-11 10:17:40.096 1291-1327/? D/vold: e4crypt_init_user0
07-11 10:17:40.096 1291-1327/? D/vold: e4crypt_prepare_user_storage for volume null, user 0, serial 0, flags 1
07-11 10:17:40.096 1291-1327/? D/vold: Preparing: /data/system/users/0
07-11 10:17:40.097 1291-1327/? D/vold: Preparing: /data/misc/profiles/cur/0
07-11 10:17:40.097 1291-1327/? D/vold: Preparing: /data/misc/profiles/cur/0/foreign-dex
07-11 10:17:40.097 1291-1327/? D/vold: Preparing: /data/system_de/0
07-11 10:17:40.098 1291-1327/? D/vold: Preparing: /data/misc_de/0
07-11 10:17:40.098 1291-1327/? D/vold: Preparing: /data/user_de/0
07-11 10:17:40.098 1291-1327/? D/vold: e4crypt_unlock_user_key 0 serial=0 token_present=0
07-11 10:17:40.099 1-1/? I/vdc: 200 1378 Command succeeded
07-11 10:17:40.105 1379-1379/? I//system/bin/tzdatacheck: tzdata file /data/misc/zoneinfo/current/tzdata does not exist. No action required.
07-11 10:17:40.123 1291-1346/? D/Cryptfs: post_fs_data done
07-11 10:17:40.123 1291-1346/? D/Cryptfs: Just triggered restart_framework
07-11 10:17:40.140 1387-1387/? W/mediadrmserver: type=1400 audit(0.0:6): avc: denied { getattr } for path="/vendor" dev="rootfs" ino=2977 scontext=u:r:mediadrmserver:s0 tcontext=u:object_r:rootfs:s0 tclass=lnk_file permissive=0
07-11 10:17:40.140 1381-1381/? W/audioserver: type=1400 audit(0.0:7): avc: denied { getattr } for path="/vendor" dev="rootfs" ino=2977 scontext=u:r:audioserver:s0 tcontext=u:object_r:rootfs:s0 tclass=lnk_file permissive=0
07-11 10:17:40.140 1386-1386/? W/mediacodec: type=1400 audit(0.0:8): avc: denied { getattr } for path="/vendor" dev="rootfs" ino=2977 scontext=u:r:mediacodec:s0 tcontext=u:object_r:rootfs:s0 tclass=lnk_file permissive=0
07-11 10:17:40.170 1382-1382/? W/cameraserver: type=1400 audit(0.0:9): avc: denied { getattr } for path="/vendor" dev="rootfs" ino=2977 scontext=u:r:cameraserver:s0 tcontext=u:object_r:rootfs:s0 tclass=lnk_file permissive=0
07-11 10:17:40.345 1386-1386/? I/mediacodec: @@@ mediacodecservice starting

                                             [ 07-11 10:17:40.346  1386: 1386 W/         ]
                                             No seccomp filter defined for this architecture.
07-11 10:17:40.347 1382-1382/? I/cameraserver: ServiceManager: 0xabbbc020
07-11 10:17:40.349 1382-1382/? I/CameraService: CameraService started (pid=1382)
07-11 10:17:40.349 1382-1382/? I/CameraService: CameraService process starting
07-11 10:17:40.349 1382-1382/? W/BatteryNotifier: batterystats service unavailable!
07-11 10:17:40.349 1382-1382/? W/BatteryNotifier: batterystats service unavailable!
07-11 10:17:40.360 1382-1382/? D/EmulatedCamera_QemuClient: Emulated camera list: 
07-11 10:17:40.360 1382-1382/? D/EmulatedCamera_FakeCamera: Initialize: Fake camera is facing back
07-11 10:17:40.360 1382-1382/? V/EmulatedCamera_Device: initializeWhiteBalanceModes with auto, 1.000000, 1.000000
07-11 10:17:40.360 1382-1382/? V/EmulatedCamera_Device: initializeWhiteBalanceModes with incandescent, 1.380000, 0.600000
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Device: initializeWhiteBalanceModes with daylight, 1.090000, 0.920000
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Device: initializeWhiteBalanceModes with twilight, 0.920000, 1.220000
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Device: setWhiteBalanceMode with white balance auto
07-11 10:17:40.361 1382-1382/? D/EmulatedCamera_FakeCamera: Initialize: Fake camera is facing front
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Device: initializeWhiteBalanceModes with auto, 1.000000, 1.000000
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Device: initializeWhiteBalanceModes with incandescent, 1.380000, 0.600000
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Device: initializeWhiteBalanceModes with daylight, 1.090000, 0.920000
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Device: initializeWhiteBalanceModes with twilight, 0.920000, 1.220000
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Device: setWhiteBalanceMode with white balance auto
07-11 10:17:40.361 1382-1382/? E/EmulatedCamera_Factory: 2 cameras are being emulated. 0 of them are fake cameras.
07-11 10:17:40.361 1382-1382/? E/EmulatedCamera_HotplugThread: createFileIfNotExists: Could not create file '/data/misc/media/emulator.camera.hotplug.0', error: 'Permission denied' (13)
07-11 10:17:40.361 1382-1382/? E/EmulatedCamera_HotplugThread: createFileIfNotExists: Could not create file '/data/misc/media/emulator.camera.hotplug.1', error: 'Permission denied' (13)
07-11 10:17:40.361 1382-1382/? I/CameraService: Loaded "Emulated Camera Module" camera module
07-11 10:17:40.361 1382-1382/? E/CameraService: setUpVendorTags: Vendor tag operations not fully defined. Ignoring definitions.
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Camera: getCameraInfo
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_BaseCamera: getCameraInfo
07-11 10:17:40.361 1382-1382/? I/CameraFlashlight: Opening camera 0
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Camera: getCameraInfo
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_BaseCamera: getCameraInfo
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_Camera: connectCamera
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_FakeDevice: connectDevice
07-11 10:17:40.361 1382-1382/? V/EmulatedCamera_CallbackNotifier: setCallbacks: 0xac1ce000, 0xac1ce050, 0xac1ce170, 0xac1ce290 (0xabbc3140)
07-11 10:17:40.361 1382-1382/? I/ServiceManager: Waiting for service SurfaceFlinger...


                                                 [ 07-11 10:17:40.375  1381: 1381 I/         ]
                                                 sMaxFastTracks = 8
07-11 10:17:40.375 1381-1381/? I/audioserver: ServiceManager: 0xae2bc020
07-11 10:17:40.375 1381-1381/? W/BatteryNotifier: batterystats service unavailable!
07-11 10:17:40.375 1381-1381/? I/AudioFlinger: Using default 3000 mSec as standby time.

2 个答案:

答案 0 :(得分:0)

我遇到了类似的问题,那就是英特尔HAXM。在我的情况下,模拟器启动并且Launcher3 / Pixel Launcher总是崩溃,显示如下所示的堆栈跟踪

07-27 12:28:45.838 1340-2511/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
[ 07-27 12:28:45.840  3990: 3990 D/] HostConnection::get() New Host Connection established 0x7111e90641a0, tid 3990
[ 07-27 12:28:45.841  3990: 3990 W/] Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 

我设法通过从Android Studio上的SDK管理器卸载Intel HAXM并从Intel HAXM site下载最新版本并直接在操作系统中安装来解决此问题。我还将zip存档上的所有文件复制到路径C:\Users\<your_user_name>\AppData\Local\Android\sdk\extras\intel,以确保AVD检测到文件。

希望这有帮助!

答案 1 :(得分:0)

尝试在不同的路径中构建新的模拟器。并且最好使用另一种手机型号。正常图像没问题,64位图像没用。