返回信息流求助:Linux下Android虚拟机无法启动,一点击start,就报错误:failed to create drawable
模拟器一直停留在界面全黑的状态,有人知道解决办法么,网上百度了都没有答案
这是一条镜像帖。来源:北邮人论坛 / mobile-terminal-at / #6828同步于 2012/7/10
该镜像源已超过 30 天没有更新,可能在源站已被删除。
MobileTerminalAT机器人发帖
求助:Linux下Android虚拟机无法启动
hjlovess501
2012/7/10镜像同步5 回复
订阅后,新回复会通过你的通知中心匿名送达。
5 条回复
如果直接用sdk manager启动emulator,重新开一个终端,启动adb logcat 或者ddms看里面的日志,就知道哪里错了。
但是这些必须是能够检测到设备已经存在。我不知道你的情况可不可以。
所以你最后试一下用命令直接启动emulator:
#emulator -<avd name> -partition-size 1024 -verbose
内存ram默认设置的是512m,肯定够用,所以不是内存问题。仅仅是启动一个系统的image,rom也不用超过1G。
你再看看verbose之后的log里面哪里报错了。 然后把你的verbose的信息贴上来再说。
【 在 lylywsws 的大作中提到: 】
: 如果直接用sdk manager启动emulator,重新开一个终端,启动adb logcat 或者ddms看里面的日志,就知道哪里错了。
: 但是这些必须是能够检测到设备已经存在。我不知道你的情况可不可以。
: 所以你最后试一下用命令直接启动emulator:
: ...................
按照你说的做了,我的模拟器名字是bnm。但是一开是启动的时候,还是报failed to create drawable错误,模拟器名字也显示0:bnm,模拟器屏幕是黑的,而不是5556:bnm这种的,但是等着等着,就正常了,能启动出现界面了,但是要等好久,我觉得还是failed to create drawable的错误,不知道怎么解决呀,困扰N天了。。。
日志如下:
root@mhs-virtual-machine:/usr/lib/x86_64-linux-gnu# emulator -avd bnm -partition-size 1024 -verbose
emulator: found SDK root at /root/android-sdk-linux
emulator: Android virtual device file at: /root/.android/avd/bnm.ini
emulator: virtual device content at /root/.android/avd/bnm.avd
emulator: virtual device config file: /root/.android/avd/bnm.avd/config.ini
emulator: using core hw config path: /root/.android/avd/bnm.avd/hardware-qemu.ini
emulator: Found AVD target API level: 7
emulator: found skin 'WVGA800' in directory: /root/android-sdk-linux/platforms/android-7/skins
emulator: autoconfig: -skin WVGA800
emulator: autoconfig: -skindir /root/android-sdk-linux/platforms/android-7/skins
emulator: found skin-specific hardware.ini: /root/android-sdk-linux/platforms/android-7/skins/WVGA800/hardware.ini
emulator: keyset loaded from: /root/.android/default.keyset
emulator: trying to load skin file '/root/android-sdk-linux/platforms/android-7/skins/WVGA800/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: autoconfig: -kernel /root/android-sdk-linux/platforms/android-7/images//kernel-qemu
emulator: autoconfig: -ramdisk /root/android-sdk-linux/platforms/android-7/images//ramdisk.img
emulator: Using initial system image: /root/android-sdk-linux/platforms/android-7/images//system.img
emulator: autoconfig: -data /root/.android/avd/bnm.avd/userdata-qemu.img
emulator: autoconfig: -initdata /root/.android/avd/bnm.avd/userdata.img
emulator: autoconfig: -cache /root/.android/avd/bnm.avd/cache.img
emulator: autoconfig: -sdcard /root/.android/avd/bnm.avd/sdcard.img
emulator: Physical RAM size: 128MB
Content of hardware configuration file:
hw.cpu.arch = arm
hw.ramSize = 128
hw.screen = touch
hw.mainKeys = yes
hw.trackBall = yes
hw.keyboard = no
hw.keyboard.lid = yes
hw.keyboard.charmap = qwerty2
hw.dPad = yes
hw.gsmModem = yes
hw.gps = yes
hw.battery = yes
hw.accelerometer = yes
hw.audioInput = yes
hw.audioOutput = yes
hw.sdCard = yes
hw.sdCard.path = /root/.android/avd/bnm.avd/sdcard.img
disk.cachePartition = yes
disk.cachePartition.path = /root/.android/avd/bnm.avd/cache.img
disk.cachePartition.size = 66m
hw.lcd.width = 480
hw.lcd.height = 800
hw.lcd.depth = 16
hw.lcd.density = 240
hw.lcd.backlight = yes
hw.gpu.enabled = no
hw.camera.back = emulated
hw.camera.front = none
vm.heapSize = 24
hw.sensors.proximity = yes
hw.sensors.magnetic_field = yes
hw.sensors.orientation = yes
hw.sensors.temperature = yes
kernel.path = /root/android-sdk-linux/platforms/android-7/images//kernel-qemu
kernel.parameters = android.checkjni=1
disk.ramdisk.path = /root/android-sdk-linux/platforms/android-7/images//ramdisk.img
disk.systemPartition.initPath = /root/android-sdk-linux/platforms/android-7/images//system.img
disk.systemPartition.size = 1g
disk.dataPartition.path = /root/.android/avd/bnm.avd/userdata-qemu.img
disk.dataPartition.size = 1g
avd.name = bnm
.
QEMU options list:
emulator: argv[00] = "/root/android-sdk-linux/tools/emulator-arm"
emulator: argv[01] = "-android-hw"
emulator: argv[02] = "/root/.android/avd/bnm.avd/hardware-qemu.ini"
Concatenated QEMU options:
/root/android-sdk-linux/tools/emulator-arm -android-hw /root/.android/avd/bnm.avd/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: nand_add_dev: system,size=0x40000000,initfile=/root/android-sdk-linux/platforms/android-7/images//system.img
emulator: mapping 'system' NAND image to /tmp/android-root/emulator-PVEoHd
emulator: rounding devsize up to a full eraseunit, now 40008000
emulator: nand_add_dev: userdata,size=0x40000000,file=/root/.android/avd/bnm.avd/userdata-qemu.img
emulator: rounding devsize up to a full eraseunit, now 40008000
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '24m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '240'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: nand_add_dev: cache,size=0x4200000,file=/root/.android/avd/bnm.avd/cache.img
emulator: Initializing hardware OpenGLES emulation support
failed to create drawable
Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory
failed to create drawable
Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory
emulator: Kernel parameters: qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 android.checkjni=1 ndns=1
emulator: autoconfig: -scale 0.85363
emulator: emulator window was out of view and was recentered
emulator: Could not open file: (null)/system/build.prop: No such file or directory
emulator: control console listening on port 5554, ADB on port 5555
emulator: sent '0012host:emulator:5555' to ADB server
emulator: ping program: /root/android-sdk-linux/tools/ddms
emulator: ping command: /root/android-sdk-linux/tools/ddms ping emulator 20.0 "Mesa Project" "Software Rasterizer" "2.1 Mesa 7.11"
goldfish_fb_get_pixel_format:167: display surface,pixel format:
bits/pixel: 16
bytes/pixel: 2
depth: 16
red: bits=5 mask=0xf800 shift=11 max=0x1f
green: bits=6 mask=0x7e0 shift=5 max=0x3f
blue: bits=5 mask=0x1f shift=0 max=0x1f
alpha: bits=0 mask=0x0 shift=0 max=0x0
emulator: User configuration saved to /root/.android/avd/bnm.avd/emulator-user.ini
root@mhs-virtual-machine:/usr/lib/x86_64-linux-gnu# emulator -avd bnm -partition-size 1024 -verbose
emulator: found SDK root at /root/android-sdk-linux
emulator: Android virtual device file at: /root/.android/avd/bnm.ini
emulator: virtual device content at /root/.android/avd/bnm.avd
emulator: virtual device config file: /root/.android/avd/bnm.avd/config.ini
emulator: using core hw config path: /root/.android/avd/bnm.avd/hardware-qemu.ini
emulator: Found AVD target API level: 7
emulator: found skin 'WVGA800' in directory: /root/android-sdk-linux/platforms/android-7/skins
emulator: autoconfig: -skin WVGA800
emulator: autoconfig: -skindir /root/android-sdk-linux/platforms/android-7/skins
emulator: found skin-specific hardware.ini: /root/android-sdk-linux/platforms/android-7/skins/WVGA800/hardware.ini
emulator: keyset loaded from: /root/.android/default.keyset
emulator: trying to load skin file '/root/android-sdk-linux/platforms/android-7/skins/WVGA800/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: autoconfig: -kernel /root/android-sdk-linux/platforms/android-7/images//kernel-qemu
emulator: autoconfig: -ramdisk /root/android-sdk-linux/platforms/android-7/images//ramdisk.img
emulator: Using initial system image: /root/android-sdk-linux/platforms/android-7/images//system.img
emulator: autoconfig: -data /root/.android/avd/bnm.avd/userdata-qemu.img
emulator: autoconfig: -initdata /root/.android/avd/bnm.avd/userdata.img
emulator: autoconfig: -cache /root/.android/avd/bnm.avd/cache.img
emulator: autoconfig: -sdcard /root/.android/avd/bnm.avd/sdcard.img
emulator: Physical RAM size: 128MB
Content of hardware configuration file:
hw.cpu.arch = arm
hw.ramSize = 128
hw.screen = touch
hw.mainKeys = yes
hw.trackBall = yes
hw.keyboard = no
hw.keyboard.lid = yes
hw.keyboard.charmap = qwerty2
hw.dPad = yes
hw.gsmModem = yes
hw.gps = yes
hw.battery = yes
hw.accelerometer = yes
hw.audioInput = yes
hw.audioOutput = yes
hw.sdCard = yes
hw.sdCard.path = /root/.android/avd/bnm.avd/sdcard.img
disk.cachePartition = yes
disk.cachePartition.path = /root/.android/avd/bnm.avd/cache.img
disk.cachePartition.size = 66m
hw.lcd.width = 480
hw.lcd.height = 800
hw.lcd.depth = 16
hw.lcd.density = 240
hw.lcd.backlight = yes
hw.gpu.enabled = no
hw.camera.back = emulated
hw.camera.front = none
vm.heapSize = 24
hw.sensors.proximity = yes
hw.sensors.magnetic_field = yes
hw.sensors.orientation = yes
hw.sensors.temperature = yes
kernel.path = /root/android-sdk-linux/platforms/android-7/images//kernel-qemu
kernel.parameters = android.checkjni=1
disk.ramdisk.path = /root/android-sdk-linux/platforms/android-7/images//ramdisk.img
disk.systemPartition.initPath = /root/android-sdk-linux/platforms/android-7/images//system.img
disk.systemPartition.size = 1g
disk.dataPartition.path = /root/.android/avd/bnm.avd/userdata-qemu.img
disk.dataPartition.size = 1g
avd.name = bnm
.
QEMU options list:
emulator: argv[00] = "/root/android-sdk-linux/tools/emulator-arm"
emulator: argv[01] = "-android-hw"
emulator: argv[02] = "/root/.android/avd/bnm.avd/hardware-qemu.ini"
Concatenated QEMU options:
/root/android-sdk-linux/tools/emulator-arm -android-hw /root/.android/avd/bnm.avd/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: nand_add_dev: system,size=0x40000000,initfile=/root/android-sdk-linux/platforms/android-7/images//system.img
emulator: mapping 'system' NAND image to /tmp/android-root/emulator-uFHKNL
emulator: rounding devsize up to a full eraseunit, now 40008000
emulator: nand_add_dev: userdata,size=0x40000000,file=/root/.android/avd/bnm.avd/userdata-qemu.img
emulator: rounding devsize up to a full eraseunit, now 40008000
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '24m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '240'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: nand_add_dev: cache,size=0x4200000,file=/root/.android/avd/bnm.avd/cache.img
emulator: Initializing hardware OpenGLES emulation support
failed to create drawable
Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory
failed to create drawable
Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory
emulator: Kernel parameters: qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 android.checkjni=1 ndns=1
emulator: autoconfig: -scale 0.85363
emulator: emulator window was out of view and was recentered
emulator: Could not open file: (null)/system/build.prop: No such file or directory
emulator: control console listening on port 5554, ADB on port 5555
emulator: sent '0012host:emulator:5555' to ADB server
emulator: ping program: /root/android-sdk-linux/tools/ddms
emulator: ping command: /root/android-sdk-linux/tools/ddms ping emulator 20.0 "Mesa Project" "Software Rasterizer" "2.1 Mesa 7.11"
goldfish_fb_get_pixel_format:167: display surface,pixel format:
bits/pixel: 16
bytes/pixel: 2
depth: 16
red: bits=5 mask=0xf800 shift=11 max=0x1f
green: bits=6 mask=0x7e0 shift=5 max=0x3f
blue: bits=5 mask=0x1f shift=0 max=0x1f
alpha: bits=0 mask=0x0 shift=0 max=0x0
【 在 nothingren 的大作中提到: 】
: lz,请问你的这个问题解决了吗?我遇到了跟你一样的问题
换个内存大点的电脑就行,我的4G就可以了