其他分享
首页 > 其他分享> > Android模拟器用户界面已损坏且混乱

Android模拟器用户界面已损坏且混乱

作者:互联网

我安装了没有Android Studio的Android SDK,并使用avdmanager创建了一个AVD,当我使用模拟器命令运行它时,模拟器混乱了,看起来很奇怪!

这是模拟器的屏幕截图:

Screen shot of android loading page
Screen shot of home page

这是我用来创建AVD的命令:

 avdmanager create avd -n Pixel -k 'system-images;android-24;google_apis;x86_64' -d 'pixel_xl' -b 'google_apis/x86_64'

这是我已安装的SDK的列表:

Path                              | Version | Description                       | Location
-------                           | ------- | -------                           | -------
build-tools;25.0.3                | 25.0.3  | Android SDK Build-Tools 25.0.3    | build-tools\25.0.3\
emulator                          | 26.0.3  | Android Emulator                  | emulator\
extras;android;m2repository       | 47.0.0  | Android Support Repository        | extras\android\m2repository\
extras;google;g...e_play_services | 39      | Google Play services              | extras\google\g..._play_services\
extras;google;m2repository        | 47      | Google Repository                 | extras\google\m2repository\
extras;google;usb_driver          | 11      | Google USB Driver                 | extras\google\usb_driver\
extras;intel;Ha...ecution_Manager | 6.0.6   | Intel x86 Emulator Accelerator... | extras\intel\Ha...cution_Manager\
patcher;v4                        | 1       | SDK Patch Applier v4              | patcher\v4\
platform-tools                    | 25.0.5  | Android SDK Platform-Tools        | platform-tools\
platforms;android-24              | 2       | Android SDK Platform 24           | platforms\android-24\
platforms;android-25              | 3       | Android SDK Platform 25           | platforms\android-25\
system-images;a...;default;x86_64 | 7       | Intel x86 Atom_64 System Image    | system-images\a...default\x86_64\
system-images;a...gle_apis;x86_64 | 11      | Google APIs Intel x86 Atom_64 ... | system-images\a...le_apis\x86_64\
tools                             | 26.0.1  | Android SDK Tools 26.0.1          | tools\

这是我运行它时的模拟器日志:

emulator:Android emulator version 25.3.0.0 (build_id 3394391)
emulator:Found AVD name 'pixel'
emulator:Found AVD target architecture: x86_64
emulator:argv[0]: 'C:\Android\android-sdk\tools\emulator.exe'; program directory: 'C:\Android\android-sdk\tools'
emulator:  Found directory: C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\

emulator:Probing for C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/kernel-ranchu: file exists
emulator:Auto-config: -engine qemu2 (based on configuration)
emulator:  Found directory: C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\

emulator:try dir C:\Android\android-sdk\tools
emulator:try dir C:\Android\android-sdk\tools\
emulator:try dir C:\Android\android-sdk\emulator
emulator:Found target-specific 64-bit emulator binary: C:\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-x86_64.exe
emulator:Adding library search path: 'C:\Android\android-sdk\emulator/lib64'
emulator:  Found directory: C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\

emulator:  Found directory: C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\

emulator:GPU emulation is disabled
emulator: Adding library search path for Qt: 'C:\Android\android-sdk\emulator\lib64\qt\lib'
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=C:\Android\android-sdk\emulator\lib64\qt\plugins
emulator:Quoted param: [C:\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-x86_64.exe]
emulator:Quoted param: [-avd]
emulator:Quoted param: [pixel]
emulator:Quoted param: [-verbose]
emulator: Running :C:\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-x86_64.exe
emulator: qemu backend: argv[00] = "C:\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-x86_64.exe"
emulator: qemu backend: argv[01] = "-avd"
emulator: qemu backend: argv[02] = "pixel"
emulator: qemu backend: argv[03] = "-verbose"
emulator: Concatenated backend parameters:
 C:\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-x86_64.exe -avd pixel -verbose
emulator: Android virtual device file at: C:\Users\SINA-PC\.android\avd\pixel.ini
emulator: virtual device content at C:\Users\SINA-PC\.android\avd\Pixel.avd
emulator: virtual device config file: C:\Users\SINA-PC\.android\avd\Pixel.avd/config.ini
emulator: using core hw config path: C:\Users\SINA-PC\.android\avd\Pixel.avd/hardware-qemu.ini
emulator: Found AVD target API level: 24
emulator: Read property file at C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/build.prop
emulator: No boot.prop property file found.
emulator: Warning: config.ini contains invalid skin.path entry: (null)
emulator: autoconfig: -skin HVGA
emulator: autoconfig: -skindir (null)
emulator: autoconfig: -kernel C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/kernel-ranchu
emulator: Target arch = 'x86_64'
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/ramdisk.img
emulator: Using initial system image: C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/system.img
emulator: autoconfig: -data C:\Users\SINA-PC\.android\avd\Pixel.avd/userdata-qemu.img
emulator: autoconfig: -initdata C:\Users\SINA-PC\.android\avd\Pixel.avd/userdata.img
emulator: autoconfig: -cache C:\Users\SINA-PC\.android\avd\Pixel.avd/cache.img
emulator: Increasing RAM size to 1024MB
emulator: VM heap size 0MB is below hardware specified minimum of 256MB,setting it to that value
emulator: System image is read only
emulator: Found 3 DNS servers: 185.98.113.113 185.98.114.114 192.168.1.1
emulator: skin name 'HVGA' aliased to '320x480'
emulator: found magic skin width=320 height=480 bpp=16

emulator: CPU Acceleration: working
emulator: CPU Acceleration status: HAXM version 6.0.6 (3) is installed and usable.
emulator: GPU emulation is disabled
emulator: Adjusting Contiguous Memory Allocation of 320x480 framebuffer for software renderer to 2MB.
emulator: Found 3 DNS servers: 185.98.113.113 185.98.114.114 192.168.1.1
Content of hardware configuration file:
  hw.cpu.arch = x86_64
  hw.cpu.ncore = 2
  hw.ramSize = 1024
  hw.screen = multi-touch
  hw.mainKeys = false
  hw.trackBall = false
  hw.keyboard = false
  hw.keyboard.lid = false
  hw.keyboard.charmap = qwerty2
  hw.dPad = false
  hw.rotaryInput = false
  hw.gsmModem = true
  hw.gps = true
  hw.battery = true
  hw.accelerometer = true
  hw.audioInput = true
  hw.audioOutput = true
  hw.sdCard = true
  disk.cachePartition = true
  disk.cachePartition.path = C:\Users\SINA-PC\.android\avd\Pixel.avd/cache.img
  disk.cachePartition.size = 66m
  hw.lcd.width = 320
  hw.lcd.height = 480
  hw.lcd.depth = 16
  hw.lcd.density = 560
  hw.lcd.backlight = true
  hw.gpu.enabled = false
  hw.gpu.mode = (null)
  hw.gpu.blacklisted = no
  hw.initialOrientation = portrait
  hw.camera.back = emulated
  hw.camera.front = none
  vm.heapSize = 256
  hw.sensors.light = true
  hw.sensors.pressure = true
  hw.sensors.humidity = true
  hw.sensors.proximity = true
  hw.sensors.magnetic_field = true
  hw.sensors.orientation = true
  hw.sensors.temperature = true
  hw.useext4 = true
  kernel.path = C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/kernel-ranchu
  kernel.newDeviceNaming = yes
  kernel.supportsYaffs2 = no
  disk.ramdisk.path = C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/ramdisk.img
  disk.systemPartition.initPath = C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/system.img
  disk.systemPartition.size = 2560m
  disk.dataPartition.path = C:\Users\SINA-PC\.android\avd\Pixel.avd/userdata-qemu.img
  disk.dataPartition.size = 550m
  disk.encryptionKeyPartition.path = C:\Users\SINA-PC\.android\avd\Pixel.avd/encryptionkey.img
  PlayStore.enabled = false
  avd.name = pixel
.
QEMU options list:
emulator: argv[00] = "C:\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-x86_64.exe"
emulator: argv[01] = "-dns-server"
emulator: argv[02] = "185.98.113.113,185.98.114.114,192.168.1.1"
emulator: argv[03] = "-serial"
emulator: argv[04] = "null"
emulator: argv[05] = "-cpu"
emulator: argv[06] = "android64"
emulator: argv[07] = "-enable-hax"
emulator: argv[08] = "-smp"
emulator: argv[09] = "cores=2"
emulator: argv[10] = "-m"
emulator: argv[11] = "1024"
emulator: argv[12] = "-lcd-density"
emulator: argv[13] = "560"
emulator: argv[14] = "-kernel"
emulator: argv[15] = "C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/kernel-ranchu"
emulator: argv[16] = "-initrd"
emulator: argv[17] = "C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/ramdisk.img"
emulator: argv[18] = "-object"
emulator: argv[19] = "iothread,id=disk-iothread"
emulator: argv[20] = "-drive"
emulator: argv[21] = "if=none,overlap-check=none,cache=unsafe,index=0,id=system,file=C:\Users\SINA-PC\.android\avd\Pixel.avd\system.img.qcow2,read-only"
emulator: argv[22] = "-device"
emulator: argv[23] = "virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify"
emulator: argv[24] = "-drive"
emulator: argv[25] = "if=none,overlap-check=none,cache=unsafe,index=1,id=cache,file=C:\Users\SINA-PC\.android\avd\Pixel.avd/cache.img.qcow2,l2-cache-size=1048576"
emulator: argv[26] = "-device"
emulator: argv[27] = "virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify"
emulator: argv[28] = "-drive"
emulator: argv[29] = "if=none,overlap-check=none,cache=unsafe,index=2,id=userdata,file=C:\Users\SINA-PC\.android\avd\Pixel.avd/userdata-qemu.img.qcow2,l2-cache-size=1048576"
emulator: argv[30] = "-device"
emulator: argv[31] = "virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify"
emulator: argv[32] = "-drive"
emulator: argv[33] = "if=none,overlap-check=none,cache=unsafe,index=3,id=encrypt,file=C:\Users\SINA-PC\.android\avd\Pixel.avd/encryptionkey.img.qcow2,l2-cache-size=1048576"
emulator: argv[34] = "-device"
emulator: argv[35] = "virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify"
emulator: argv[36] = "-netdev"
emulator: argv[37] = "user,id=mynet"
emulator: argv[38] = "-device"
emulator: argv[39] = "virtio-net-pci,netdev=mynet"
emulator: argv[40] = "-netdev"
emulator: argv[41] = "user,id=mynet2,net=10.0.3.0/24"
emulator: argv[42] = "-device"
emulator: argv[43] = "virtio-net-pci,netdev=mynet2"
emulator: argv[44] = "-show-cursor"
emulator: argv[45] = "-L"
emulator: argv[46] = "C:\Android\android-sdk\emulator/lib/pc-bios"
emulator: argv[47] = "-soundhw"
emulator: argv[48] = "hda"
emulator: argv[49] = "-vga"
emulator: argv[50] = "none"
emulator: argv[51] = "-append"
emulator: argv[52] = "qemu=1 androidboot.hardware=ranchu clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=0 qemu.encrypt=1 cma=260M ndns=3"
emulator: argv[53] = "-android-hw"
emulator: argv[54] = "C:\Users\SINA-PC\.android\avd\Pixel.avd/hardware-qemu.ini"
Concatenated QEMU options:
 C:\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-x86_64.exe -dns-server 185.98.113.113,185.98.114.114,192.168.1.1 -serial null -cpu android64 -enable-hax -smp cores=2 -m 1024 -lcd-density 560 -kernel C:\Android\android-sd
k/system-images\android-24\google_apis\x86_64\/kernel-ranchu -initrd C:\Android\android-sdk/system-images\android-24\google_apis\x86_64\/ramdisk.img -object iothread,id=disk-iothread -drive if=none,overlap-check=none,cache=unsafe,index=0
,id=system,file=C:\Users\SINA-PC\.android\avd\Pixel.avd\system.img.qcow2,read-only -device virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=1,id=cache,file=C:\Users
\SINA-PC\.android\avd\Pixel.avd/cache.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=2,id=userdata,file=C:\Users\SINA-PC\.a
ndroid\avd\Pixel.avd/userdata-qemu.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=3,id=encrypt,file=C:\Users\SINA-PC\.an
droid\avd\Pixel.avd/encryptionkey.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify -netdev user,id=mynet -device virtio-net-pci,netdev=mynet -netdev user,id=mynet2,net=10.0.3.0
/24 -device virtio-net-pci,netdev=mynet2 -show-cursor -L C:\Android\android-sdk\emulator/lib/pc-bios -soundhw hda -vga none -append 'qemu=1 androidboot.hardware=ranchu clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=
1 qemu.gles=0 qemu.encrypt=1 cma=260M ndns=3' -android-hw C:\Users\SINA-PC\.android\avd\Pixel.avd/hardware-qemu.ini
emulator: Starting QEMU main loop
Hax is enabled
Hax ram_size 0x40000000
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '256m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '560'
HAX is working and emulator runs in fast virt mode.
emulator: goldfish_events.have-dpad: false
emulator: goldfish_events.have-trackball: false
emulator: goldfish_events.have-camera: true
emulator: goldfish_events.have-keyboard: false
emulator: goldfish_events.have-lidswitch: false
emulator: goldfish_events.have-touch: false
emulator: goldfish_events.have-multitouch: true
emulator: control console listening on port 5554, ADB on port 5555

谢谢您的宝贵时间!

解决方法:

启动模拟器时设置皮肤可以解决我的问题!感谢@CommonsWare为我指出正确的方向.

emulator -avd pixel -skin 1080x1920

标签:android-emulator,avd,emulation,android
来源: https://codeday.me/bug/20191111/2019460.html