quarks
quarks

Reputation: 35316

IOException: Broken pipe when running Android application

When trying to run my Android app from Eclipse I get this error in the console:

    [2013-03-04 14:19:05 - ddmlib] Broken pipe
    java.io.IOException: Broken pipe
        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:89)
        at sun.nio.ch.IOUtil.write(IOUtil.java:60)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:450)
        at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)
        at com.android.ddmlib.Client.sendAndConsume(Client.java:605)
        at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:348)
        at com.android.ddmlib.Client.requestAllocationStatus(Client.java:451)
        at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:837)
        at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:805)
        at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:765)
        at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:652)
        at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:44)
        at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:580)

How do I fix this kind of error?

When I did adb connect <IP_ADDRESS> it showed connected to 192.168.0.109:5555

Upvotes: 5

Views: 21087

Answers (5)

nb2998
nb2998

Reputation: 479

Try changing the USB Cable. I had a slightly broken USB cable which was charging the phone perfectly but gave this error on running any application.

Upvotes: 0

DoGooder
DoGooder

Reputation: 1

On the device Pull down the notification bar Select USB for charging Select Use USB for File transfers

Then change it back to Select Use USB for Charging

-- also, switch cables or usb ports sometimes helps.

Upvotes: 0

jzaldumbide
jzaldumbide

Reputation: 1

You can only close the emulator that is currently running and then start a new one from the IDE that you are using, e.g. eclipse.. runa as.. Android Application. That's it.

Upvotes: 0

Mailis Toompuu
Mailis Toompuu

Reputation: 1729

on win7 and using GenyMotion I

1.open Oracle VM VirtualBox Manager;

2.from a menu select File -> Preferences...;

3.in the opened window switch to Network;

4.on the right hand there are three icons, the lowest's tag is 'Edit host-only network(Space)', click on that;

5.new window opens;

6.check wether your 'IPv4 address' (Adapter tab) is between 'Lower Address Bound' and 'Upper Address Bound' (DHCP Server tab);

7.if it is not, make it to be between;

8.if it is, change the 'IPv4 address' address: e.g. if the old one was 192.168.112.104, then change it to 192.168.112.105;

9.click OK-buttons on opened windows;

10.try whether your virtual device works again.

Before that I also close all processes related to Virtual* or Virt*, in TaskManager.

Upvotes: 2

Anup Cowkur
Anup Cowkur

Reputation: 20563

This error is usually caused due to the IO pipe between eclipse and your emulator being broken. You don't usually need to worry about this if it isn't causing any problems in your app. Also see this thread.

Upvotes: 5

Related Questions