This article is for .NET Developers those who are developing android app using Xamarin maybe Visual studio and ASP.NET Web APIs in Visual studio.

Solution is fairly simple but it took long for me to figure it out.

I believe it will help the folks out there looking to debug Web APIs from the app emulator.

Let’s keep it simple

1- Goto VS web API project properties and change the localhost with 127.0.0.1:port

Step 2 – Goto android emulator settings and add 10.0.2.2 and same port number as in Visual studio

 

That’s it, you are good to go, just make sure the port is same in both Visual studio and emulator.

Sparky!