微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

通过USB部署Xamarin Forms应用程序会引发异常

如何解决通过USB部署Xamarin Forms应用程序会引发异常

下午好,

从Visual Studio 2019部署到现有的android仿真器以及通过USB的物理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,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,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。

有人可以提供解决此问题的线索吗?或可以提供一些有关如何继续的见解?

edit:已修复,在较早的尝试中,我取消了在android设置菜单中的会话之间保留缓存的选项,从而改变了问题。搜索此新问题会产生一些建议。最终成功的是将android仿真器重置为出厂认值。这也解决了USB调试的问题

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。