安卓模拟器无法启动,AVD。

13

这是我的情况:我在 Ubuntu 10.04 LTS 64 位下有一台 XPS 笔记本电脑。

我下载了最新版的 Android SDK 和 Eclipse。SDK 运行良好,但当我创建一个新的 AVD 并运行它时,AVD 可以加载但没有显示出来。我不明白原因,你有关于我的问题的想法吗?

谢谢。

我通过命令行启动我的 AVD:

romain@XPS-Dak:~/.android$ emulator -verbose -avd Test
emulator: found SDK root at /home/romain/android-sdk-linux
emulator: Android virtual device file at: /home/romain/.android/avd/Test.ini
emulator: virtual device content at /home/romain/.android/avd/Test.avd
emulator: virtual device config file: /home/romain/.android/avd/Test.avd/config.ini
emulator: using core hw config path: /home/romain/.android/avd/Test.avd/hardware-qemu.ini
emulator: Found AVD target API level: 3
emulator: 'magic' skin format detected: 1024x600
emulator: autoconfig: -skin 1024x600
emulator: autoconfig: -skindir (null)
emulator: keyset loaded from: /home/romain/.android/default.keyset
emulator: found SDK root at /home/romain/android-sdk-linux
emulator: trying to load skin file '/home/romain/android-sdk-linux/tools/lib/emulator/skins/dynamic//layout'
emulator: loaded dynamic skin width=1024 height=600 bpp=16

emulator: autoconfig: -kernel /home/romain/android-sdk-linux/platforms/android-3/images//kernel-qemu
emulator: autoconfig: -ramdisk /home/romain/android-sdk-linux/platforms/android-3/images//ramdisk.img
emulator: Using initial system image: /home/romain/android-sdk-linux/platforms/android-3/images//system.img
emulator: autoconfig: -data /home/romain/.android/avd/Test.avd/userdata-qemu.img
emulator: autoconfig: -initdata /home/romain/.android/avd/Test.avd/userdata.img
emulator: autoconfig: -cache /home/romain/.android/avd/Test.avd/cache.img
emulator: Physical RAM size: 512MB

Content of hardware configuration file:
  hw.cpu.arch = arm
  hw.ramSize = 512
  hw.screen = touch
  hw.mainKeys = no
  hw.trackBall = no
  hw.keyboard = yes
  hw.keyboard.lid = yes
  hw.keyboard.charmap = qwerty2
  hw.dPad = no
  hw.gsmModem = yes
  hw.gps = yes
  hw.battery = yes
  hw.accelerometer = yes
  hw.audioInput = yes
  hw.audioOutput = yes
  hw.sdCard = no
  disk.cachePartition = yes
  disk.cachePartition.path = /home/romain/.android/avd/Test.avd/cache.img
  disk.cachePartition.size = 66m
  hw.lcd.width = 1024
  hw.lcd.height = 600
  hw.lcd.depth = 16
  hw.lcd.density = 160
  hw.lcd.backlight = yes
  hw.gpu.enabled = no
  hw.camera.back = emulated
  hw.camera.front = none
  vm.heapSize = 16
  hw.sensors.proximity = yes
  hw.sensors.magnetic_field = yes
  hw.sensors.orientation = yes
  hw.sensors.temperature = yes
  kernel.path = /home/romain/android-sdk-linux/platforms/android-3/images//kernel-qemu
  kernel.parameters =  android.checkjni=1
  disk.ramdisk.path = /home/romain/android-sdk-linux/platforms/android-3/images//ramdisk.img
  disk.systemPartition.initPath = /home/romain/android-sdk-linux/platforms/android-3/images//system.img
  disk.systemPartition.size = 200m
  disk.dataPartition.path = /home/romain/.android/avd/Test.avd/userdata-qemu.img
  disk.dataPartition.size = 200m
  avd.name = Test
.
QEMU options list:
emulator: argv[00] = "/home/romain/android-sdk-linux/tools/emulator64-arm"
emulator: argv[01] = "-android-hw"
emulator: argv[02] = "/home/romain/.android/avd/Test.avd/hardware-qemu.ini"
Concatenated QEMU options:
 /home/romain/android-sdk-linux/tools/emulator64-arm -android-hw /home/romain/.android/avd/Test.avd/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: nand_add_dev: system,size=0xc800000,initfile=/home/romain/android-sdk-linux/platforms/android-3/images//system.img
emulator: mapping 'system' NAND image to /tmp/android-romain/emulator-wbnmYS
emulator: rounding devsize up to a full eraseunit, now c810000

emulator: nand_add_dev: userdata,size=0xc800000,file=/home/romain/.android/avd/Test.avd/userdata-qemu.img
emulator: rounding devsize up to a full eraseunit, now c810000

emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '16m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '160'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: nand_add_dev: cache,size=0x4200000,file=/home/romain/.android/avd/Test.avd/cache.img
emulator: Initializing hardware OpenGLES emulation support
Erreur de segmentation (core dumped)

2
我们需要更多的细节来帮助您... 请描述一下:"我的AVD已经加载但没有显示。" 我想看到模拟器的截图,请在Imgur上发布后添加图像链接。 - Sam
另外,尝试使用“-verbose”标志从命令行运行模拟器,以查看您收到的错误消息。 - CommonsWare
我刚刚在文章上添加了新项目。 - Romain Daquin
3个回答

16
你遇到了和我一样的问题,详见这个问题。在SDK的tools/目录中找到你的libOpenglRender.so文件,并将其重命名。

@RomainDaquin:“这只在Ubuntu上吗?”-- 如果你仔细阅读问题,你会发现其他Linux发行版也受到影响(例如Fedora)。 - CommonsWare
对于64位系统,请删除lib64OpenglRender.so文件。我花了一个小时来调试这个问题。 - Sandeep

0

虽然不是针对 OP 的确切问题的解决方案,但仍然适用于“Android 模拟器无法启动,AVD”的问题。

确保没有其他程序在竞争虚拟化资源。

我曾经运行过一个无头 Virtual Box 镜像,并遇到了类似的情况。它会显示为已启动,但模拟器却不可见。 ./emulator -verbose -avd ... 永远无法完成。


-4

在第一次运行时,您需要耐心等待。它需要一段时间来加载。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接