【问题标题】:Android App crashes while trying to attach debuggerAndroid 应用程序在尝试附加调试器时崩溃
【发布时间】:2017-01-15 07:09:21
【问题描述】:

当我尝试附加 Android Studio 调试器时,我的一些应用程序崩溃了,然后我收到了这个错误:

Disconnected from the target VM, address: 'localhost:8602', transport: 'socket'

我尝试重新启动 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"

【问题讨论】:

标签: android android-studio crash


【解决方案1】:

我在 Mac 上的 Android Studio 3.0 中遇到了完全相同的问题。解决方案来自this answer,基本上你需要禁用Instant Run(虽然我没用过):

在 Mac OS X 下:

  1. Android 工作室
  2. 首选项
  3. 构建、执行、部署
  4. 即时运行
  5. 取消选中“启用 Instant Run 以进行热插拔...”。

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

【讨论】:

  • 在我的设备从 Marshmallow 更新为 Nougat 后开始发生。这解决了问题...非常感谢!
【解决方案2】:

几个月前我解决了同样的问题,用这个,试试这个:

转到

  1. 工具
  2. 机器人
  3. 启用 adb 集成,调试时必须勾选此项。尝试取消选中并再次选中。
  4. 最后重启 android studio 或先插再插移动设备。

希望它有效。

【讨论】:

  • same here :'( 有没有人解决这个问题?
  • 为我工作,我尝试不重新启动并拔下我的设备,但它没有效果。
【解决方案3】:

这听起来可能很愚蠢,但经过数小时的尝试并重新启动我所能做的一切,真正解决问题的是.....

  1. 卸载应用程序。
  2. 清理项目(构建 -> 清理项目)
  3. 安装

就是这样!!

希望这会有所帮助。

【讨论】:

  • 这没有帮助
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-04-25
  • 2023-02-14
  • 1970-01-01
相关资源
最近更新 更多