简体   繁体   中英

Android emulator in Xamarin Visual Studio does not show the app

I made a new Xamarin Project in Visual Studio , I chose the Single View App .

  • Then I did not make any changes.

  • I just pressed the Run Button.

  • The emulator started ,

  • but the app was not appeared in the menu of the phone of the emulator.

Is there anyone who know what cause the problem?

On Windows you have a couple of options to accelerate the Emulator. Read more here: https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=windows

Using HyperV : Make sure to install the Windows Hypervisor Platform :

  1. Right click on the Windows button and select 'Apps and Features'.
  2. Select Programs and Features on the right under related settings.
  3. Select Turn Windows Features on or off.
  4. Select Hyper-V and click OK.

You probably need to restart your computer after.

Intel HAXM : If you are not using HyperV and don't intend and don't run other hypervisors such as VMWare, VirtualBox etc. then you can install Intel HAXM.

In the Android SDK manager, in tools, download Intel HAXM. After that is done, go to the folder where the Android SDK is installed. There should be an extras folder where there will be an installer for Intel HAXM.

On macOS , Intel HAXM is the way to go. Read how to install it here: https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=macos

Should be as easy as running sh ~/Library/Developer/Xamarin/android-sdk-macosx/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh from a command-line.

Either of these approaches should significantly speed up the Android Emulator.

If you have issues deloying to the emulator, sometimes the default configurations have very limited space and installing anything may fail due to the emulator running out of storage. Go to the Android AVD and increase the internal storage size.

For other failures, check the Deploy Output window in Visual Studio and provide more information of what is going wrong. Otherwise it is just a guess.

This might be just a bug. Create a new project. If still blank wait 5 minutes. Maybe your computer is slow so it takes time to load.

If you start using xamarin for the first time

  1. Create device from dropout menu (don't just let it create it from pressing run button).
  2. Select device from dropout menu.
  3. Run up.

if it didn't added just restart Visual Studio (should change "Run" into name of the device)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM