4

Some of, just some of, my apps crash while I try to attach Android Studio debugger, then I receive this error :

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

I tried restarting Windows & Android Studio & My Nexus, nothing works.

I am using latest version Android SDK, Build Tools,...

Part of log after this crash :

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"
DarthHater
  • 3,222
  • 25
  • 26
AVEbrahimi
  • 17,993
  • 23
  • 107
  • 210

3 Answers3

6

I had the exact same problem in Android Studio 3.0 on Mac. The solution came from this answer, basically you need to disable Instant Run (eventhough I haven't use it):

Under Mac OS X:

  1. Android Studio
  2. Preferences
  3. Build, Execution, Deployment
  4. InstantRun
  5. uncheck "Enable Instant Run to hot swap ...".

There is a "Having trouble with Instant Run?" message displayed in the settings panel. I clicked on "Re-enable and activate extra logging", reproduced the crash, and then immediately reported using the "Help - Report Instant Run Issue..." option as they requested.

Gavriel
  • 18,880
  • 12
  • 68
  • 105
0

I solve same kind problem few month ago, by using this, please try this one time:

Go to

  1. tools
  2. android
  3. enable adb integration, this must be check when you are in debugging. try to uncheck and again checked.
  4. finally restart android studio or upluged then pluged moibile device.

Hope it works.

Horrorgoogle
  • 7,858
  • 11
  • 48
  • 81
0

This may sound really dumb, but after hours of trying around and restarting everything I could, what really solved the issue was.....

  1. Uninstall the application.
  2. Clean project (Build -> Clean Project)
  3. Install

That's it!!

Hope this helps.

Udit
  • 1,037
  • 6
  • 11