我已经进行了测试,开始使用Visual Studio学习Xamarin,代码与该软件的官方指南相同,并且没有给我任何语法错误。当我尝试使用Android模拟器启动该项目时,它什么也没运行。
很显然,我按照官方指南设置了运行Android模拟器的所有要求,因此我使用API27创建了Android 8.1设备,如果我仅运行模拟器,而无需编译代码,则可以很好地运行。这是对模拟器配置正确的确认。 在上面的代码中,我在运行代码时发布了控制台的所有行。
Starting runtime checks
Starting emulator my_device ...
C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -partition-size 512 -no-boot-anim -verbose -feature WindowsHypervisorPlatform -avd my_device -prop monodroid.avdname=my_device
1>------ Build started: Project: SeguiamoGuida, Configuration: Debug Any CPU ------
emulator: Android virtual device file at: C:\Users\Michelangelo\.android\avd\my_device.ini
emulator: virtual device content at C:\Users\Michelangelo\.android\avd\my_device.avd
emulator: virtual device config file: C:\Users\Michelangelo\.android\avd\my_device.avd/config.ini
emulator: using core hw config path: C:\Users\Michelangelo\.android\avd\my_device.avd/hardware-qemu.ini
emulator: using snapshot lock path: C:\Users\Michelangelo\.android\avd\my_device.avd/snapshot.lock
emulator: Found AVD target API level: 27
emulator: Read property file at C:\Program Files (x86)\Android\android-sdk/system-images\android-27\google_apis_playstore\x86\/build.prop
emulator: No boot.prop property file found.
emulator: Warning: config.ini contains invalid skin.path entry: (null)
emulator: autoconfig: -skin 1080x1920
emulator: autoconfig: -skindir (null)
emulator: autoconfig: -kernel C:\Program Files (x86)\Android\android-sdk/system-images\android-27\google_apis_playstore\x86\/kernel-ranchu
emulator: Target arch = 'x86'
emulator: Auto-config: -qemu -cpu qemu32
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk C:\Program Files (x86)\Android\android-sdk/system-images\android-27\google_apis_playstore\x86\/ramdisk.img
emulator: Using initial system image: C:\Program Files (x86)\Android\android-sdk/system-images\android-27\google_apis_playstore\x86\/system.img
emulator: Using initial vendor image: C:\Program Files (x86)\Android\android-sdk/system-images\android-27\google_apis_playstore\x86\/vendor.img
emulator: autoconfig: -data C:\Users\Michelangelo\.android\avd\my_device.avd/userdata-qemu.img
emulator: autoconfig: -initdata C:\Users\Michelangelo\.android\avd\my_device.avd/userdata.img
emulator: autoconfig: -cache C:\Users\Michelangelo\.android\avd\my_device.avd/cache.img
emulator: autoconfig: -sdcard C:\Users\Michelangelo\.android\avd\my_device.avd/sdcard.img
emulator: Physical RAM size: 1024MB
emulator: System image is read only
emulator: Found 4 DNS servers: 8.8.8.8 8.8.4.4 fec0:0:0:ffff::1 fec0:0:0:ffff::2
emulator: ERROR: Not enough disk space to run AVD 'my_device'. Exiting...
emulator: Android emulator version 27.3.9.0 (build_id 4899998) (CL:e7b1c928a596dd490b990f4532055950f1409e49)
emulator: Found AVD name 'my_device'
emulator: Found AVD target architecture: x86
emulator: argv[0]: 'C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE'; program directory: 'C:\Program Files (x86)\Android\android-sdk\emulator'
The selected emulator couldn't be started. This can be caused by the process not having enough permissions. Please try to start VS as administrator, which can help to avoid it.emulator: Found directory: C:\Program Files (x86)\Android\android-sdk/system-images\android-27\google_apis_playstore\x86\
Emulator my_device cannot be started.emulator: Probing for C:\Program Files (x86)\Android\android-sdk/system-images\android-27\google_apis_playstore\x86\/kernel-ranchu: file exists
emulator: Auto-config: -engine qemu2 (based on configuration)
emulator: Found directory: C:\Program Files (x86)\Android\android-sdk/system-images\android-27\google_apis_playstore\x86\Runtime checks completed
emulator: emuDirName: 'C:\Program Files (x86)\Android\android-sdk\emulator'
emulator: Found directory: C:\Program Files (x86)\Android\android-sdk/system-images\android-27\google_apis_playstore\x86\
emulator: Probing for C:\Program Files (x86)\Android\android-sdk/system-images\android-27\google_apis_playstore\x86\/kernel-ranchu-64: file missing
emulator: try dir C:\Program Files (x86)\Android\android-sdk\emulator
emulator: Trying emulator path 'C:\Program Files (x86)\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-i386.exe'
emulator: Found target-specific 64-bit emulator binary: C:\Program Files (x86)\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-i386.exe
emulator: Adding library search path: 'C:\Program Files (x86)\Android\android-sdk\emulator/lib64'
emulator: Adding library search path: 'C:\Program Files (x86)\Android\android-sdk\emulator/lib64/gles_swiftshader'
emulator: Adding library search path: 'C:\Program Files (x86)\Android\android-sdk\emulator/lib64/gles_angle'
emulator: Adding library search path: 'C:\Program Files (x86)\Android\android-sdk\emulator/lib64/gles_angle9'
emulator: Adding library search path: 'C:\Program Files (x86)\Android\android-sdk\emulator/lib64/gles_angle11'
emulator: Adding library search path for Qt: 'C:\Program Files (x86)\Android\android-sdk\emulator\lib64\qt\lib'
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=C:\Program Files (x86)\Android\android-sdk\emulator\lib64\qt\plugins
emulator: Setting Qt to use software OpenGL: QT_OPENGL=software
emulator: Quoted param: ["C:\Program Files (x86)\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-i386.exe"]
emulator: Quoted param: [-partition-size]
emulator: Quoted param: [512]
emulator: Quoted param: [-no-boot-anim]
emulator: Quoted param: [-verbose]
emulator: Quoted param: [-feature]
emulator: Quoted param: [WindowsHypervisorPlatform]
emulator: Quoted param: [-avd]
emulator: Quoted param: [my_device]
emulator: Quoted param: [-prop]
emulator: Quoted param: [monodroid.avdname=my_device]
emulator: Running :C:\Program Files (x86)\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-i386.exe
emulator: qemu backend: argv[00] = ""C:\Program Files (x86)\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-i386.exe""
emulator: qemu backend: argv[01] = "-partition-size"
emulator: qemu backend: argv[02] = "512"
emulator: qemu backend: argv[03] = "-no-boot-anim"
emulator: qemu backend: argv[04] = "-verbose"
emulator: qemu backend: argv[05] = "-feature"
emulator: qemu backend: argv[06] = "WindowsHypervisorPlatform"
emulator: qemu backend: argv[07] = "-avd"
emulator: qemu backend: argv[08] = "my_device"
emulator: qemu backend: argv[09] = "-prop"
emulator: qemu backend: argv[10] = "monodroid.avdname=my_device"
emulator: Concatenated backend parameters:
'"C:\Program Files (x86)\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-i386.exe"' -partition-size 512 -no-boot-anim -verbose -feature WindowsHypervisorPlatform -avd my_device -prop monodroid.avdname=my_device
Build has been canceled.