Android app crashes when launched in debug mode

When I run in debug mode the app crashes, but when I just run it normally it works. I think the problem happens when the debugger is attached. Log: A/art: art/runtime/jdwp/jdwp_event.cc:661] Check failed: Thread::Current() != GetDebugThread() (Thread::Current()=0x7f44a18400, GetDebugThread()=0x7f44a18400) Expected event thread A/art: art/runtime/runtime.cc:422] Runtime aborting… A/art: art/runtime/runtime.cc:422] Aborting thread: A/art: art/runtime/runtime.cc:422] “JDWP” prio=5 tid=4 WaitingForDebuggerSend … Read more