尝试附加调试器时,Android App崩溃

AVE*_*imi 4 crash android android-studio

尝试附加Android Studio调试器时,我的某些应用崩溃,然后我收到此错误:

Disconnected from the target VM, address: 'localhost:8602', transport: 'socket'
Run Code Online (Sandbox Code Playgroud)

我尝试重新启动Windows,Android Studio和My Nexus,但没有任何效果。

我正在使用最新版本的Android SDK,构建工具,...

崩溃后的部分日志:

01-16 09:08:26.967 18208-18213/? A/art: art/runtime/runtime.cc:422] Runtime aborting...
01-16 09:08:26.967 18208-18213/? A/art: art/runtime/runtime.cc:422] Aborting thread:
01-16 09:08:26.967 18208-18213/? A/art: art/runtime/runtime.cc:422] "Jit thread pool worker thread 0" prio=5 tid=2 WaitingForDebuggerSend (still starting up)
01-16 09:08:26.967 18208-18213/? A/art: art/runtime/runtime.cc:422]   | group="" sCount=0 dsCount=0 obj=0x0 self=0xec00d000
01-16 09:08:26.967 18208-18213/? A/art: art/runtime/runtime.cc:422]   | sysTid=18213 nice=9 cgrp=default sched=0/0 handle=0xf2aa5920
01-16 09:08:26.967 18208-18213/? A/art: art/runtime/runtime.cc:422]   | state=R schedstat=( 2419166052 199636564 1513 ) utm=213 stm=28 core=5 HZ=100
01-16 09:08:26.967 18208-18213/? A/art: art/runtime/runtime.cc:422]   | stack=0xf29a7000-0xf29a9000 stackSize=1022KB
01-16 09:08:26.967 18208-18213/? A/art: art/runtime/runtime.cc:422]   | held mutexes= "abort lock"
Run Code Online (Sandbox Code Playgroud)

Gav*_*iel 6

在Mac上的Android Studio 3.0中,我遇到了完全相同的问题。解决方案来自以下答案,基本上,您需要禁用即时运行(即使我没有使用它):

在Mac OS X下:

  1. Android Studio
  2. 优先
  3. 构建,执行,部署
  4. InstantRun
  5. 取消选中“启用即时运行到热插拔...”。

存在“即时运行遇到问题吗?” 消息显示在设置面板中。我单击了“重新启用并激活额外的日志记录”,重现了崩溃,然后根据他们的要求立即使用“帮助-报告即时运行问题...”选项进行了报告。