Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Debugger Port Error - "handshake failed - connection prematurely closed"

When I try to attach the Android Studio Debugger to a process, I get the following error:

Error running Android Debugger (8603): Unable to open debugger port (localhost:8603): java.io.IOException "handshake failed - connection prematurally closed" 

Kudos to whoever spelled prematurely that way. Anyway, how do I get around this problem?

I'm using Android Studio 1.2.2 on Ubuntu. This did not help.

like image 448
Menasheh Avatar asked Jun 30 '15 03:06

Menasheh


2 Answers

The best and one solution for me was just to restart Android Studio.

Before I tried to restart adb server from command prompt or disable and enable adb integration from tools->Android->Check/Unchek the line, unplug and plug device , but nothing helped.

like image 192
Hayk Nahapetyan Avatar answered Nov 09 '22 19:11

Hayk Nahapetyan


For me these didnt work: Restart Android Studio,adb kill start server, restart phone.

Worked for me: Tools->Android->Disable and Enabled ADB Integration.

like image 26
Murat Avatar answered Nov 09 '22 17:11

Murat