Xamarin Forms Android App Crashes Running Debug with VS Android Emulator

北战南征 提交于 2019-11-27 04:12:55

In short:

1. "Could not connect to the debugger" issue (Android app starts and immediately closes, debugging stops):

  1. Close the Android simulator window to shut down the virtual machine.
  2. Start the "Hyper-V Manager" (Microsoft program to manage virtual machines in Windows, you have it installed)
  3. Select the emulator you are trying to use
  4. Right-click for context menu, hit Settings
  5. In the settings dialog expand Processor
  6. Click Compatibility
  7. In the right pane set checkbox “Migrate to a physical computer with a different processor version
  8. Start the debugging in Visual Studio to restart the simulator

2. The missing libaot-mscorlib.dll.so issue:

Go to the properties of the Android project, hit tab “Android options”, and unselect “Use Fast Deployment”.

Source: Fix for “could not connect to the debugger” while deploying Xamarin Forms apps to the Visual Studio Android Emulator (VS2015)

This issue only seems to be occurring on the newer generation of processors, which explains why I never saw it before.

This happens because of an incompatibility between the Android images for the Visual Studio emulator for Android and the newer generations of Intel processors as of year 2015.

This solution is also published here: Visual studio android emulator will not start fully

UPDATE November 29, 2017

You should really consider moving to the Android emulators provided by Google via Android Studio for Windows. Newer Android API levels (24 and above) are only available there and Microsoft does not seem to care.

Unfortunately, we have no plans to publish Android images past 4.4. We recommend that you try Google or GenyMotion’s emulator for future images of the Android operating system.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!