簡體   English   中英

Android Studio AVD:啟動 AVD 時出現分段錯誤

[英]Android Studio AVD: Segmentation Fault when starting AVD

我查看了之前關於分段錯誤的帖子。 但他們似乎並沒有解決我的問題。 我嘗試禁用 GPU 模擬,將 RAM 大小更改為論壇之一中提到的值。 我想知道為什么當我啟動 AVD 時會出現分段錯誤

  1. 我不得不繼續使用 ARM 構建,因為我的 X86 處理器不支持虛擬化。

  2. uname -a 的輸出如下

    Linux Jill-HP-Pavilion-dv6-Notebook-PC 3.16.0-36-generic #48- Ubuntu SMP Tue Apr 14 20:07:19 UTC 2015 i686 i686 i686 GNU/Linux
  3. lsb-發布:

     DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.10 DISTRIB_CODENAME=utopic DISTRIB_DESCRIPTION="Ubuntu 14.10"

日志如下

./emulator-arm -avd Nexus_5_API_22_ARM -verbose
emulator: found SDK root at /home/jill/Android/Sdk
emulator: Android virtual device file at: /home/jill/.android/avd/Nexus_5_API_22_ARM.ini
emulator: virtual device content at /home/jill/.android/avd/Nexus_5_API_22_ARM.avd
emulator: virtual device config file: /home/jill/.android/avd/Nexus_5_API_22_ARM.avd/config.ini
emulator: using core hw config path: /home/jill/.android/avd/Nexus_5_API_22_ARM.avd/hardware-qemu.ini
emulator: Found AVD target API level: 22
emulator: Read property file at /home/jill/Android/Sdk/system-images/android-22/google_apis/armeabi-v7a//build.prop
emulator: No boot.prop property file found.
emulator: found skin 'nexus_5' in directory: /opt/android-studio/plugins/android/lib/device-art-resources
emulator: autoconfig: -skin nexus_5
emulator: autoconfig: -skindir /opt/android-studio/plugins/android/lib/device-art-resources
emulator: keyset loaded from: /home/jill/.android/default.keyset
emulator: trying to load skin file '/opt/android-studio/plugins/android/lib/device-art-resources/nexus_5/layout'
emulator: autoconfig: -kernel /home/jill/Android/Sdk/system-images/android-22/google_apis/armeabi-v7a//kernel-qemu
emulator: Auto-detect: Kernel image requires legacy device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk /home/jill/Android/Sdk/system-images/android-22/google_apis/armeabi-v7a//ramdisk.img
emulator: Using initial system image: /home/jill/Android/Sdk/system-images/android-22/google_apis/armeabi-v7a//system.img
emulator: autoconfig: -data /home/jill/.android/avd/Nexus_5_API_22_ARM.avd/userdata-qemu.img
emulator: autoconfig: -initdata /home/jill/.android/avd/Nexus_5_API_22_ARM.avd/userdata.img
emulator: autoconfig: -cache /home/jill/.android/avd/Nexus_5_API_22_ARM.avd/cache.img
emulator: autoconfig: -sdcard /home/jill/.android/avd/Nexus_5_API_22_ARM.avd/sdcard.img
emulator: Physical RAM size: 768MB

emulator: GPU emulation is disabled
emulator: WARNING: CPU acceleration only works with x86/x86_64 system images.

硬件配置文件內容:

  hw.cpu.arch = arm
  hw.cpu.model = cortex-a8
  hw.ramSize = 768
  hw.screen = touch
  hw.mainKeys = no
  hw.trackBall = no
  hw.keyboard = yes
  hw.keyboard.lid = no
  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 = yes
  hw.sdCard.path = /home/jill/.android/avd/Nexus_5_API_22_ARM.avd/sdcard.img
  disk.cachePartition = yes
  disk.cachePartition.path = /home/jill/.android/avd/Nexus_5_API_22_ARM.avd/cache.img
  disk.cachePartition.size = 66m
  hw.lcd.width = 1080
  hw.lcd.height = 1920
  hw.lcd.depth = 16
  hw.lcd.density = 480
  hw.lcd.backlight = yes
  hw.gpu.enabled = no
  hw.initialOrientation = portrait
  hw.camera.back = none
  hw.camera.front = none
  vm.heapSize = 64
  hw.sensors.proximity = yes
  hw.sensors.magnetic_field = yes
  hw.sensors.orientation = yes
  hw.sensors.temperature = yes
  hw.useext4 = yes
  kernel.path = /home/jill/Android/Sdk/system-images/android-22/google_apis/armeabi-v7a//kernel-qemu
  kernel.parameters =  android.checkjni=1
  kernel.newDeviceNaming = no
  kernel.supportsYaffs2 = no
  disk.ramdisk.path = /home/jill/Android/Sdk/system-images/android-22/google_apis/armeabi-v7a//ramdisk.img
  disk.systemPartition.initPath = /home/jill/Android/Sdk/system-images/android-22/google_apis/armeabi-v7a//system.img
  disk.systemPartition.size = 550m
  disk.dataPartition.path = /home/jill/.android/avd/Nexus_5_API_22_ARM.avd/userdata-qemu.img
  disk.dataPartition.size = 550m
  avd.name = Nexus_5_API_22_ARM

QEMU 選項列表:

emulator: argv[00] = "./emulator-arm"
emulator: argv[01] = "-android-hw"
emulator: argv[02] = "/home/jill/.android/avd/Nexus_5_API_22_ARM.avd/hardware-qemu.ini"
Concatenated QEMU options:
 ./emulator-arm -android-hw /home/jill/.android/avd/Nexus_5_API_22_ARM.avd/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: Using kernel serial device prefix: ttyS
emulator: Ramdisk image contains fstab.goldfish file
emulator: Found format of system partition: 'ext4'
emulator: Found format of userdata partition: 'ext4'
emulator: Found format of cache partition: 'ext4'
emulator: system partition format: ext4
emulator: Mapping 'system' partition image to /tmp/android-jill/emulator-EfqElj
emulator: nand_add_dev: system,size=0x22600000,file=/tmp/android-jill/emulator-EfqElj,initfile=/home/jill/Android/Sdk/system-images/android-22/google_apis/armeabi-v7a//system.img,pagesize=512,extrasize=0
emulator: userdata partition format: ext4
emulator: nand_add_dev: userdata,size=0x22600000,file=/home/jill/.android/avd/Nexus_5_API_22_ARM.avd/userdata-qemu.img,pagesize=512,extrasize=0
emulator: cache partition format: ext4
emulator: nand_add_dev: cache,size=0x4200000,file=/home/jill/.android/avd/Nexus_5_API_22_ARM.avd/cache.img,pagesize=512,extrasize=0
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '64m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '480'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'none'
emulator: Kernel parameters: qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 android.checkjni=1 ndns=2
emulator: autoconfig: -scale 0.303119
emulator: Forcing ro.adb.qemud to "0".
emulator: control console listening on port 5554, ADB on port 5555
emulator: can't connect to ADB server: Transport endpoint is not connected (errno = 107)
emulator: ping program: /home/jill/Android/Sdk/tools/ddms
emulator: ping command: /home/jill/Android/Sdk/tools/ddms ping emulator standalone "" "" ""
goldfish_fb_get_pixel_format:170: 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

分段錯誤(核心轉儲)

使用$ adb start-server重新啟動adb服務器

這將解決問題errno = 107

.android/avd/{avd name}.ini文件中的以下編輯為我解決了這個問題。

hw.gpu.mode=auto
hw.gpu.enabled = no

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM