我正在使用xamarin Cross Platform创建应用。一切都在调试,但当我在发布版本中使应用程序崩溃时,应用程序崩溃了。应用程序输出:
ERROR:
[mono] Unhandled Exception: [mono] System.MissingMethodException:
Method not found: 'System.Net.Http.HttpClient.GetAsync'.
[mono] at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[<LoadData>d__0] (POSSector.Mobile.<LoadData>d__0& stateMachine)
[0x00000] in <filename unknown>:0
[mono] at POSSector.Mobile.LoginViewModel.LoadData ()
[0x00000] in <filename unknown>:0
[mono] at POSSector.Mobile.LoginCommand+<Bind>d__3.MoveNext () [0x00000] in <filename unknown>:0
[mono] --- End of stack trace from previous location where exception was thrown --- [mono] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
[0x00000] in <filename unknown>:0 [mono] at System.Runtime.CompilerServices.TaskAwaiter.GetResult ()
[0x00000] in <filename unknown>:0 [mono] at POSSector.Mobile.LoginCommand+<Execute>d__0.MoveNext ()
[0x00000] in <filename unknown>:0
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: 'System.Net.Http.HttpClient.GetAsync'.