Search code examples
androidfile-ioadb

Unable to upload file to device from eclipse


I'm running into an error where I can no longer upload/run my android app from eclipse on to a real device. I don't recall having changed anything particular that would cause this error. here's my error log from console in Eclipse:

[2011-05-25 16:58:01 - Child Protector] Android Launch!

[2011-05-25 16:58:01 - Child Protector] adb is running normally.

[2011-05-25 16:58:01 - Child Protector] Performing com.example.hello.Main activity launch

[2011-05-25 16:58:03 - Child Protector] Uploading Hello.apk onto device '982394670345'

[2011-05-25 16:58:09 - Child Protector] Failed to upload Hello.apk on device '982394670345'

[2011-05-25 16:58:09 - Child Protector] java.io.IOException: Unable to upload file: null

[2011-05-25 16:58:09 - Child Protector] Launch canceled!

I'm using Eclipse on Ubuntu 9.10. I've looked at the other threads and none of the methods worked (although their error log is slightly different). My adb logcat can't print anything, because the connection never was made (im guessing). I'm able to do a manual "adb install Hello.apk" and that is fine; but i do not want to have to do it each time from terminal (because i also don't know how to use the adb uninstall command - no clue where the file on phone is).

i've tried:

  • restarting computer
  • restarting phone
  • restarting eclipse
  • turning off and on Debugging mode
  • pulling and re-plugging USB cable to phone

also note, the app seems to be able to install on the emulator if i right click the project in Eclipse and select 'Run as -> Android App'. but won't work on my phone... I have an android 2.1 Samsung Galaxy S

Also, I'm relatively new to Android, so please provide details in explanation, as my knowledge is limited.


Solution

  • Go to Eclipse Preferences, then Android, then DDMS. Set the timeout value for ADB to 10000 ms.