-1

I want run the program on the mobile phone. My programs was run but when i run another program, Eclipse writes the error in console tab. Why? Where is the problem?

I googled but i can not found solution. I close Eclipse and open again , i turn off my phone and turn on again, i end adb in Task Manager and etc, but Eclipse can not run the program :(

Failed to install ServiceTutorial.apk on device '0A3C202B1601A00A': An existing connection was forcibly closed by the remote host
java.io.IOException: An existing connection was forcibly closed by the remote host
 Launch canceled!

Please help me. Thanks

Timothy Groote
  • 8,614
  • 26
  • 52
Nice NICE
  • 111
  • 1
  • 3
  • 8
  • 2
    Have you tried this http://stackoverflow.com/questions/7411295/error-adb-connection-erroran-existing-connection-was-forcibly-closed-by-the-r – Simon Zettervall Feb 06 '13 at 16:50
  • Thanks. I read this but the program not run. When i open DDMS in Eclipse, I see 6tabs(heap, threads, alocation Tracker, network statistics, File explorer, Emulator control ) Where can i found reset adb? Sorry if my question is ridicule! – Nice NICE Feb 06 '13 at 17:09

1 Answers1

0

Make sure :

  • you have USB debugging set to "on" in the settings of your android device
  • your device is registered in the device manager of your operating system
  • the proper ADB drivers are installed for your device.
  • you are building for a version of android that runs on your device (or older)

if it still will not accept the .APK, make sure to manually remove any older versions of the apk that may still be running, or cannot be removed from the device by Eclipse.

As a last resort, try removing the adb reference to your device, and creating a new one.

Timothy Groote
  • 8,614
  • 26
  • 52
  • Thanks for quick reply. I set "ON" Usb debugging of my phone in settings. In protable devices and Universal Serial bus controllers in Device Manager, writes Galaxy nexus and SAMSUNG Mobile USB Composite Deivce. android version in my phone is 4.1.1 and android version of my program is 4.1. I don't know that i install the proper ADB drivers or no. How can i know this? – Nice NICE Feb 06 '13 at 16:58
  • if you start the Android SDK's ADB application, do you see your device listed? – Timothy Groote Feb 06 '13 at 17:04
  • You probably also need to set allow none market sources for applications. – draksia Feb 06 '13 at 17:11
  • When i run ADB application in platform-tools, the page open and fast is close. I can't read anything in page – Nice NICE Feb 06 '13 at 17:12
  • Thanks @draksia, but i can't understand what do you mean. Please more explain. Thanks – Nice NICE Feb 06 '13 at 17:14
  • I create new android program in Eclipse and the program run on my phone, but when i run another program, Eclipse can not run! WHy? – Nice NICE Feb 06 '13 at 17:18
  • 1
    Try clean build and deploy.. have you tried exporting you apk and copying it to your phone and installing and running it? – Nezam Feb 06 '13 at 18:08
  • The ADB program itself is meant to talk to android devices. Try opening the SDK manager, and clicking "tools", and then "Manage AVD's". Remove your device from there, add it again and retry. – Timothy Groote Feb 07 '13 at 11:06