Visual Studio 2015 introduces the new Android emulator. What is great is that it is based on Hyper-V technology, so hardware virtualization, as described more extensively in Introducing Visual Studio’s Emulator for Android.
Using it to develop Xamarin application, I've run into some issues, and I think that it would be good to collect them here:
- first of all, during my first attempt to run it to debug a simple application, I got in the Output windows of Visual Studio this cryptic error:
In mgmain JNI_OnLoad
Couldn't connect to logcat, GetProcessId returned: 0
As described in Can't run app on Visual Studio 2015 emulator (DWP Handshake failed), the solution is to go to the Android project settings and in the Android Options tab, disable Fast Deployment
- the second problem was that because of my naming convention for demo projects, I had a too long project name.
Doing some attempts, I've verified that the longest project name you can give is 37 characters (more create problems with the deployment);
- when I've been finally able to run my application, I've noticed that I had multiple graphic issues (even if the application is really basic).
As described in Visual studio android emulator will not start fully, you have to go to the folder C:\Program Files (x86)\Microsoft XDE\10.0.10240.0\SKUs\Android, edit the file xdesku.xml and delete/comment the line: