3
Dear friends, good morning!
I’m not getting connection on my android emulator, could anyone help me? I’m using Visualstudio Emulator for Android.
My project is compiling, and running right, but I can’t connect, I need to configure something in Hyper-V ?
The error happens when I try to connect to some web service, so I imagine it is device connection problem.
Below is code C#:
public static async Task<List<Model.Livros>> GetAsync()
{
using (var client = new HttpClient())
{
var json = await client.GetStringAsync("http://mvalivros.azurewebsites.net/api/livros");
var livros = JsonConvert.DeserializeObject<List<Model.Livros>>(json);
return livros;
}
}
Error in emulator:
Att. Felipe
Tiago S, do I need to change the gateway too? I did what you said, and I’m still not connected, take a look below:
Thanks man!
Att. Felipe
Can access any other site through android emulator browser?
– leopiazzoli
So dude, no. This error is generating when I try to access some site in the emulator browser.
– felipedrt
Try to see if the Firewall is not blocking, deactivate and test.
– leopiazzoli
I disabled the firewall here, and nothing either. Dude, do I need to leave only one of the adapters enabled? Like, leave only the internal, or the external? And if I leave only the internal, I need to share my network?
– felipedrt