Android Studio can't run project on device?

I get the following error. I could not understand why this is happening on the Internet.

ddms: Can't bind to local 8601 for debugger ddmlib: Broken pipe java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcher.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:69) at sun.nio.ch.IOUtil.write(IOUtil.java:40) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:336) at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213) at com.android.ddmlib.Client.sendAndConsume(Client.java:675) at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:342) at com.android.ddmlib.Client.requestAllocationStatus(Client.java:521) at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:847) at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:815) at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:775) at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:664) at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:46) at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:592) ddmlib: Broken pipe java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcher.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:69) at sun.nio.ch.IOUtil.write(IOUtil.java:40) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:336) at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213) at com.android.ddmlib.Client.sendAndConsume(Client.java:675) at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:342) at com.android.ddmlib.Client.requestAllocationStatus(Client.java:521) at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:847) at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:815) at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:775) at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:664) at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:46) at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:592) 

Note:

My Nexus device that runs 5.0.2

My Android Studio - 1.0.1

My platform is mac mavericks

I'm just trying to run the Login Template application no more.

thanks

+7
android android-studio adb
source share
7 answers

You can have both Android studio and Eclipse open

  • Close both applications and open the one you are going to use.

  • if this does not solve the problem, the port is used by some other application, so restart the system

  • or else destroy the port using the command if the problem remains unresolved

+8
source share

There is nothing serious about this exception. You just need to disconnect the USB cable from the port, reboot the device and restart Android-studio. Of course, this exception will be removed. It worked for me, I hope you also get rid of it.

+7
source share

Restart your computer and check

If you are using Linux, try killing the port using

fuser -k 8601/tcp

If you are using a mac, try killing the port using

lsof -P | grep '8601' | awk '{print $2}' | xargs kill

Here is the ref for osx

+6
source share

This is just stupidity committed by a system that seems to be locating a local host. Take a look at here , many people have this question, and it is quite easy to fix.

+4
source share

I'm on OS X 10.9.5. Sometimes I get this error too. Usually I disconnect the device -> restart adb (or close android studio and run again) -> connect the device -> restart again. [make sure you are not using adb from another eclipse / studio]

See if this helps you.

+4
source share

Just using adb kill-server turned to the problem for me.

+1
source share

I tried all of the above solutions: restarted the studio, restarted the devices, killed all the studio processes, killed the ports, listening ...

In the end, the only thing that worked was File -> Invalidate Caches / Restart ...

Also changing a USB cable may help ...

0
source share

All Articles