Xamarin错误Android模拟器

时间:2018-09-21 18:16:53

标签: xamarin

突然我想在Android模拟器中运行Xamarin Forms代码时开始出现以下错误。我已经将Android Manifest中的INTERNET设置为选中状态。

{System.Net.Http.HttpRequestException:发送请求时发生错误---> System.Net.WebException:错误:NameResolutionFailure   在System.Net.WebConnection + d__16.MoveNext()[0x00044]中的:0中 ---从之前引发异常的位置开始的堆栈结束跟踪---   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task任务)[0x0003e]处   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task任务)[0x00028]处   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task任务)[0x00008]处   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.ConfiguredTaskAwaitable + ConfiguredTaskAwaiter.GetResult()[0x00000]中   在System.Net.WebConnection + d__19.MoveNext()[0x000cc]中的:0中 ---从之前引发异常的位置开始的堆栈结束跟踪---   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task任务)[0x0003e]处   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task任务)[0x00028]处   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task任务)[0x00008]处   在System.Runtime.CompilerServices.ConfiguredTaskAwaitable 1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <43dbbdc147f2482093d8409abb04c233>:0 at System.Net.WebOperation+<Run>d__57.MoveNext () [0x0009a] in <b78695579ed9422b8bc80218eeda782c>:0 --- End of stack trace from previous location where exception was thrown --- at System.Net.WebCompletionSource 1 + d__15 [T] .MoveNext()[0x00094]中的位置:: 0 ---从之前引发异常的位置开始的堆栈结束跟踪---   在System.Net.HttpWebRequest + d__241 1[T].MoveNext () [0x000ba] in <b78695579ed9422b8bc80218eeda782c>:0 --- End of stack trace from previous location where exception was thrown --- at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x0001d] in <b78695579ed9422b8bc80218eeda782c>:0 at System.Threading.Tasks.TaskFactory 1 [TResult] .FromAsyncCoreLogic(System.IAsyncResult iar,System.Func 2[T,TResult] endFunction, System.Action 1 [T] endAction,System.Threading.Tasks.Task {{1} } 1 + ConfiguredTaskAwaiter [TResult] .GetResult()[0x00000]在<43dbbdc147f2482093d8409abb04c233>:0中   在System.Net.Http.HttpClientHandler + d__64.MoveNext()[0x0041d]中的:0中    ---内部异常堆栈跟踪的结尾---   在System.Net.Http.HttpClientHandler + d__64.MoveNext()[0x00478]中:: 0 ---从之前引发异常的位置开始的堆栈结束跟踪---   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task任务)[0x0003e]处   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task任务)[0x00028]处   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task任务)[0x00008]处   在<43dbbdc147f2482093d8409abb04c233>:0中的System.Runtime.CompilerServices.ConfiguredTaskAwaitable 1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <43dbbdc147f2482093d8409abb04c233>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <43dbbdc147f2482093d8409abb04c233>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <43dbbdc147f2482093d8409abb04c233>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <43dbbdc147f2482093d8409abb04c233>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable 1 [TResult] .GetResult()[0x00000]中   在PetApp.MainPage + d__2.MoveNext()[0x000bc]在C:\ Develop \ petapp \ PetApp \ PetApp \ MainPage.xaml.cs:38}

0 个答案:

没有答案