I have an application in the C# language that develops an application for android (using xamarin). The application works normally for android versions 2, 3, 4 and 5. However, using a device with android 6 (marshmallow), the application is loaded but randomly crashes displaying the following message on the device screen: "The XXXXX application has stopped" (XXXXX is the name of my application).
When this message occurs, in Visual Studio the following exception is thrown:
Debugger lost connection to the running application. Likely this means the application terminated unexpectedly.
More details can usually be found in the device's debug log:
Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown. in Mono.Debugger.Soft.Connection.SendReceive(CommandSet command_set, Int32 command, PacketWriter packet) in Mono.Debugger.Soft.Connection.Object_GetInfo(Int64 id) in Mono.Debugger.Soft.VirtualMachine.GetObject[T](Int64 id , Int64 domain_id, Int64 type_id) in Mono.Debugger.Soft.VirtualMachine.GetObject[T](Int64 id) in Mono.Debugger.Soft.Event.get_Thread() in Mono.Debugging.Soft.SoftDebuggerSession.HandleThreadStartEvents(ThreadStartEvent events) in Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(EventSet es)
I already tried to download API 23, I tried to update the JDK, I tried to change the "target" in the "manifest" file. But I was not successful. Does anyone know how to solve this problem?
Thank you in advance.
It's hard to help you without at least knowing which version of xamarin you use. On the internet there are several reports of users suffering from the same problem, but in older versions than the current one.
I recommend you to update your xamarin and perform a clean install.
(Wish this 'answer' was a comment as it didn't solve the problem directly, but I don't have enough reputation on the StackOverflow PT forums.)