问题
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?
回答1:
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.
回答2:
I just ran into this error. To resolve it, I deleted my .apk file and built the project again. Voila! Upload works now.
回答3:
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 ;)
回答4:
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).
回答5:
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.
回答6:
Did you try to add the path of the tools directory to your system PATH as described here ?
来源:https://stackoverflow.com/questions/2269579/ioexception-everytime-i-try-to-upload-anything-to-android-emulator