0

When I launch the Android environment, the app crash and the worklight console show this message. The app works on browser environment

[2013-08-29 09:57:47 - ddmlib] An established connection was aborted by the software in your host machine
    java.io.IOException: An established connection was aborted by the software in your host machine
        at sun.nio.ch.SocketDispatcher.write0(Native Method)
        at sun.nio.ch.SocketDispatcher.write(Unknown Source)
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
        at sun.nio.ch.IOUtil.write(Unknown Source)
        at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
        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)

and logcat:

[2013-08-29 09:57:47 - ddmlib] An established connection was aborted by the software in your host machine
java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(Unknown Source)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
    at sun.nio.ch.IOUtil.write(Unknown Source)
    at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
    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)

2 Answers 2

1

"These problem can be simply solved by closing Eclipse and restarting it again. Eclipse sometimes fails to establish a connection with the Emulator, so this can happen in some cases." - source

0

In addition to the above answer,

1) Are you sure you're not getting a timeout error? Check in the Android Logcat view in eclipse. 2) Are you using something like a localhost in the application?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.