5

I'm using Windows 7 Ultimate 64 bit edition and Eclipse 3.5 with the Android plugin. Every time I create a new project and try to publish it, I get an error like this:

[2010-02-15 22:48:10 - EPG3]Uploading EPG3.apk onto device 'emulator-5554'
[2010-02-15 22:48:15 - EPG3]Failed to upload EPG3.apk on device 'emulator-5554'
[2010-02-15 22:48:15 - EPG3]java.io.IOException: Unable to upload file: timeout
[2010-02-15 22:48:15 - EPG3]Launch canceled!

The emulator is working perfectly, adb can see it, I can even logcat from it, but it can't push or pull anything from it. Nothing appears in logcat to suggest the emulator even received any command. It doesn't matter if I have the Firewall on or off, or if I try invoking adb install to bypass the plugin. Nothing works even with a blank app.

Any ideas?

Christopher Orr
  • 110,418
  • 27
  • 198
  • 193
locka
  • 5,809
  • 3
  • 33
  • 38
  • Make sure you start Eclipse using "run as administrator". – Patrick Kafka Feb 16 '10 at 01:11
  • Running as administrator makes no difference. Same issue - IOException. I am able to pull files from the emulator, I am able to run a shell on it. I am able to run logcat. I just can't install anything. – locka Feb 16 '10 at 21:49
  • um, weird. Try running adb from an admin shell? – Segfault Feb 15 '10 at 23:08
  • Doesn't seem to make a difference. I ran as an admin shell and a command such as "adb install EPG3.apk" just hangs there forever. I can type "adb shell" for example and it connects no problems, but nothing when trying to install. – locka Feb 15 '10 at 23:43

6 Answers6

16

Not sure if this helps but I had the same exception when I tried uploading a project to the device and fixed it by increasing the value of "adb connection time out (ms)"

PC: (eclipse -> window -> settings -> android -> ddms) MAC: (eclipse -> preferences -> android -> ddms)

I was pretty pissed at myself that it took me so long to find the setting so I thought I'd share.

Brian Headlee
  • 213
  • 2
  • 4
DieBagger
  • 161
  • 1
  • 3
3

I just ran into this error. To resolve it, I deleted my .apk file and built the project again. Voila! Upload works now.

user502267
  • 31
  • 1
  • Unfortunately this wasn't it. It adb was simply refusing to connect to the emulator. Or rather it would connect but sit there forever from the command line, or timeout from within the Eclipse plugin. Either way it was connecting, just not doing anything. I resolved it by using a 64-bit JVM so all I can surmise was it was some kind of disagreement caused by running a 32-bit JVM on top of a 64-bit version of Windows. – locka Nov 10 '10 at 10:04
1

Isnt this a problem with resources loading? Tried all the hello examples without problems, now the first with drawables and now I/O problem as you had.

I think its the reason that in the example they speak of a drawable folder, but in my default project structur there are 3 drawable folders.

Keep on debugging ;)

Raphael
  • 11
  • 1
1

I got this error about every 30-40 compilations. I don't how, but this solution work for me.

Go to bin/ folder and rename your EPG3-debug.apk file to EPG3.apk (if you are using debug mode) or EPG3-release.apk to EPG3.apk (in Run mode), return to Eclipse, now you can Debug/Run your application. This should "unchoke" this whole situation, so you can make changes in your code and next time Debug/Run program normally (until you get this error once again, then you must repeat this tip).

NiegodziwyBeru
  • 864
  • 1
  • 10
  • 19
0

See this question — Windows 7 and Android don't seem to get on so well initially it seems: Failed to parse the output of 'adb version'?

Are you able to telnet to localhost 5037? That's where the adb server listens for incoming connections from adb clients.

Community
  • 1
  • 1
Christopher Orr
  • 110,418
  • 27
  • 198
  • 193
  • Yes I can telnet to 5037 no probs. It dismisses if I type random chars I can also telnet to 5554 & 5555 which are the ports the emulator opens. The 5554 port responds to commands as well. I thought it might be my JDK. I do a lot of Java development so I had a few versions laying around but I've confirmed I'm using j2se 6 32-bit edition. – locka Feb 17 '10 at 22:35
0

Did you try to add the path of the tools directory to your system PATH as described here ?

  • Yes, tried that. As best as I can tell the issue is not with adb running, or with the emulator running but in getting adb to upload anything to the emulator. From what I understand the Eclipse plugin is through the IOException I see whereas when I do it through adb it just hangs indefinitely. I'll add that my adb won't upload anything to an attached device either. If I try something such as adb -d install foo.apk, it just hangs there forever. Everything functions correctly through Ubuntu on a second machine (although adb server has to be run with sudo to install to USB devices). – locka May 18 '10 at 10:01