Dear, good morning!
I am not getting connection in my android emulator, could someone help me? I'm using VisualStudio Emulator for Android.
My project is compiling, and running correctly, but I can not connect, do 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 a device connection problem.
Below is C # code:
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;
}
}
Emulator error:
VMSettings:
Att.Felipe
JamesS,doIneedtochangethegatewaytoo?Ididwhatyousaid,andI'mstillwithoutaconnection,takealookbelow:
Thanks a lot!
Att. Felipe