Android 通过USB部署Xamarin表单应用程序引发异常

Android 通过USB部署Xamarin表单应用程序引发异常,android,visual-studio,xamarin,mono,Android,Visual Studio,Xamarin,Mono,下午好 在通过USB将visual studio 2019部署到现有的android emulator和物理android设备时,我遇到了以下问题 10-08 13:04:19.890 D/Mono ( 3655): Assembly Ref addref SelectronMobileApp[0x77deaf1d80] -> SData[0x77deb43980]: 2 Operation is not valid due to the current state of the o

下午好

在通过USB将visual studio 2019部署到现有的android emulator和物理android设备时,我遇到了以下问题

10-08 13:04:19.890 D/Mono    ( 3655): Assembly Ref addref SelectronMobileApp[0x77deaf1d80] -> SData[0x77deb43980]: 2
Operation is not valid due to the current state of the object.
System.InvalidOperationException: Operation is not valid due to the current state of the object.
   at Mono.Cecil.ModuleDefinition.ProcessDebugHeader()
   at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader)
   at Mono.Debugging.Soft.SoftDebuggerSession.LoadPdbFile(String assemblyFileName, String pdbFileName) in E:\A\_work\4743\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerSession.cs:line 2816
   at Mono.Debugging.Soft.SoftDebuggerSession.LoadDebugFile(String assemblyFileName, String debugFileName, Func`3 loadDebugFile) in E:\A\_work\4743\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerSession.cs:line 2916
   at Mono.Debugging.Soft.SoftDebuggerSession.CheckBetterMatch(TypeMirror type, String file, Int32 line, Int32 column, Location found) in E:\A\_work\4743\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerSession.cs:line 2943
   at Mono.Debugging.Soft.SoftDebuggerSession.FindLocationByMethod(MethodMirror method, String file, Int32 line, Int32 column, Boolean& insideTypeRange) in E:\A\_work\4743\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerSession.cs:line 3118
   at Mono.Debugging.Soft.SoftDebuggerSession.FindLocationByType(TypeMirror type, String file, Int32 line, Int32 column, Boolean& genericMethod, Boolean& insideTypeRange) in E:\A\_work\4743\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerSession.cs:line 3136
   at Mono.Debugging.Soft.SoftDebuggerSession.ResolveBreakpoints(TypeMirror type) in E:\A\_work\4743\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerSession.cs:line 2629
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleTypeLoadEvents(TypeLoadEvent[] events) in E:\A\_work\4743\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerSession.cs:line 2183
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(EventSet es) in E:\A\_work\4743\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerSession.cs:line 1722
   at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler() in E:\A\_work\4743\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerSession.cs:line 1644
在这之后,一切都停止工作,我无法让应用程序运行了。多次重新启动系统并没有解决问题

我第一次遇到这个问题时,我需要在一个外部类库中工作,这个类库在项目中也被引用为dll,但是,这并不是导致这个错误的dll

有没有人能提供如何解决这个问题的线索?或者可以提供一些关于如何继续的见解


编辑:修复,在之前的一次尝试中,我取消了android设置菜单中保留会话间缓存的选项,这改变了问题。对这一新问题的研究提出了几点建议。成功的一个是将android emulator重置为出厂默认值。这也解决了usb调试的问题

方法调用对对象当前状态无效时引发的异常。但这里看起来更像是调试点问题。您是否可以删除/禁用任何调试点,然后重新启动IDE并重试。@user8608556感谢您的参与。我用我的修正编辑了我的问题。但当模拟器再次出现意外行为时,我一定会记住你的建议