Android Emulator 因 float 异常而崩溃

标签 android linux android-emulator qemu

我的环境是 Linux 3.2.0-60-generic#91-Ubuntu x86_64 GNU/Linux。我已经安装了 Eclipse Kepler 和 Android SDK v19。当我尝试启动 AVD 模拟器(没有 eclipse 只是为了删除该变量)时,我看到模拟器崩溃并出现“浮点异常”错误。

这似乎是 Qemu 的一个错误。我还没有编写应用程序或部署任何应用程序。我看到启动空 AVD 时发生崩溃!完全迷失在这个问题上。

这是来自

的日志
~/android-sdks/tools $./emulator -verbose @FantainAVD -qemu -smp 2 
emulator: found SDK root at /home/vivekv/android-sdks
emulator: Android virtual device file at: /home/vivekv/.android/avd/FantainAVD.ini
emulator: virtual device content at /home/vivekv/.android/avd/FantainAVD.avd
emulator: virtual device config file: /home/vivekv/.android/avd/FantainAVD.avd/config.ini
emulator: using core hw config path: /home/vivekv/.android/avd/FantainAVD.avd/hardware-qemu.ini
emulator: Found AVD target API level: 19
emulator: Read property file at /home/vivekv/android-sdks/system-images/android-19/x86//build.prop
emulator: No boot.prop property file found.
emulator: found skin 'QVGA' in directory: /home/vivekv/android-sdks/platforms/android-19/skins
emulator: autoconfig: -skin QVGA
emulator: autoconfig: -skindir /home/vivekv/android-sdks/platforms/android-19/skins
emulator: found skin-specific hardware.ini: /home/vivekv/android-sdks/platforms/android-19/skins/QVGA/hardware.ini
emulator: keyset loaded from: /home/vivekv/.android/default.keyset
emulator: trying to load skin file '/home/vivekv/android-sdks/platforms/android-19/skins/QVGA/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: autoconfig: -kernel /home/vivekv/android-sdks/system-images/android-19/x86//kernel-qemu
emulator: autoconfig: -ramdisk /home/vivekv/android-sdks/system-images/android-19/x86//ramdisk.img
emulator: Using initial system image: /home/vivekv/android-sdks/system-images/android-19/x86//system.img
emulator: autoconfig: -data /home/vivekv/.android/avd/FantainAVD.avd/userdata-qemu.img
emulator: autoconfig: -initdata /home/vivekv/.android/avd/FantainAVD.avd/userdata.img
emulator: autoconfig: -cache /home/vivekv/.android/avd/FantainAVD.avd/cache.img
emulator: autoconfig: -sdcard /home/vivekv/.android/avd/FantainAVD.avd/sdcard.img
emulator: Physical RAM size: 512MB

Content of hardware configuration file:
  hw.cpu.arch = x86
  hw.ramSize = 512
  hw.screen = touch
  hw.mainKeys = yes
  hw.trackBall = yes
  hw.keyboard = no
  hw.keyboard.lid = no
  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 = /home/vivekv/.android/avd/FantainAVD.avd/sdcard.img
  disk.cachePartition = yes
  disk.cachePartition.path = /home/vivekv/.android/avd/FantainAVD.avd/cache.img
  disk.cachePartition.size = 66m
  hw.lcd.width = 240
  hw.lcd.height = 320
  hw.lcd.depth = 16
  hw.lcd.density = 120
  hw.lcd.backlight = yes
  hw.gpu.enabled = yes
  hw.camera.back = emulated
  hw.camera.front = none
  vm.heapSize = 48
  hw.sensors.proximity = yes
  hw.sensors.magnetic_field = yes
  hw.sensors.orientation = yes
  hw.sensors.temperature = yes
  hw.useext4 = yes
  kernel.path = /home/vivekv/android-sdks/system-images/android-19/x86//kernel-qemu
  kernel.parameters =  androidboot.hardware=goldfish clocksource=pit android.checkjni=1
  disk.ramdisk.path = /home/vivekv/android-sdks/system-images/android-19/x86//ramdisk.img
  disk.systemPartition.initPath = /home/vivekv/android-sdks/system-images/android-19/x86//system.img
  disk.systemPartition.size = 550m
  disk.dataPartition.path = /home/vivekv/.android/avd/FantainAVD.avd/userdata-qemu.img
  disk.dataPartition.size = 200m
  avd.name = FantainAVD
.
QEMU options list:
emulator: argv[00] = "./emulator64-x86"
emulator: argv[01] = "-smp"
emulator: argv[02] = "2"
emulator: argv[03] = "-android-hw"
emulator: argv[04] = "/home/vivekv/.android/avd/FantainAVD.avd/hardware-qemu.ini"
Concatenated QEMU options:
 ./emulator64-x86 -smp 2 -android-hw /home/vivekv/.android/avd/FantainAVD.avd/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: nand_add_dev: system,size=0x22600000,initfile=/home/vivekv/android-sdks/system-images/android-19/x86//system.img,pagesize=512,extrasize=0
emulator: mapping 'system' NAND image to /tmp/android-vivekv/emulator-xu2UXA
emulator: nand_add_dev: userdata,size=0xc800000,file=/home/vivekv/.android/avd/FantainAVD.avd/userdata-qemu.img,pagesize=512,extrasize=0
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '48m'
emulator: Adding boot property: 'ro.config.low_ram' = 'true'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '120'
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=/home/vivekv/.android/avd/FantainAVD.avd/cache.img,pagesize=512,extrasize=0
emulator: Initializing hardware OpenGLES emulation support
Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory
Failed to load libGL.so
error libGL.so: cannot open shared object file: No such file or directory
emulator: No kvm device file detected
emulator: Kernel parameters: qemu.gles=1 qemu=1 console=ttyS0 android.qemud=ttyS1 androidboot.hardware=goldfish clocksource=pit android.checkjni=1 ndns=-1
emulator:     trying to find: /home/vivekv/android-sdks/tools/bios.bin

emulator:     trying to find: /home/vivekv/android-sdks/tools/lib/pc-bios/bios.bin

emulator:     trying to find: /home/vivekv/android-sdks/tools/vgabios-cirrus.bin

emulator:     trying to find: /home/vivekv/android-sdks/tools/lib/pc-bios/vgabios-cirrus.bin

emulator: autoconfig: -scale 1
emulator: control console listening on port 5554, ADB on port 5555
emulator: can't connect to ADB server: Connection refused
emulator: ping program: /home/vivekv/android-sdks/tools/ddms
emulator: ping command: /home/vivekv/android-sdks/tools/ddms ping emulator 22.6.0 "Tungsten Graphics, Inc" "Mesa DRI Intel(R) Ivybridge Mobile " "3.0 Mesa 8.0.4"
goldfish_fb_get_pixel_format:169: 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
Floating point exception

最佳答案

您的第一个错误是您的 android studio 无法加载 libGL.so,这里有一个很好的答案:

Failed to load libGL.so on Android

链接您的 .so 后,您应该不会有任何问题。或者至少你应该有一个新问题要解决

关于Android Emulator 因 float 异常而崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22247794/

相关文章:

android - 如何在 ANDROID 中取消 paypal 交易并从 PayPal 退还金额?

java - Android:通过索引获取arrayList元素

android - 返回 Activity 之间的共享元素转换

安卓事物 : 5. 1

php - 如果我想在 linux 中开发 php 应用程序,哪个版本的 linux 最好?

linux - 在 linux 上从一开始就设置进程的 cpu 亲和性

linux - 进程的内存详细信息

android - 如何指定 Android 模拟器应该在我的开发机器上使用哪个网络接口(interface)?

android - 无法从命令提示符将 android apk 安装到模拟器

android - 创建 Android AVD 卡住