Failed to install Android.apk on device 'emulator-5554': timeout


[2015-03-30 21:05:10 - Toast] ------------------------------
[2020-03-30 21:05:10 - Toast] Android Launch!
[2020-03-30 21:05:10 - Toast] adb is running normally.
[2020-03-30 21:05:10 - Toast] Performing com.code2care.toast.MainActivity activity launch
[2020-03-30 21:05:12 - Toast] Uploading Android.apk onto device 'emulator-5554'
[2020-03-30 21:05:23 - Toast] Failed to install Toast.apk on device 'emulator-5554': timeout
[2020-03-30 21:05:23 - Toast] Launch canceled!
[2020-03-30 21:06:17 - Toast] ------------------------------
Android Emulator Timeout Error
Android Emulator Timeout Error

If you are getting the above error message in the Android ADT Eclipse console when you are trying to run your Android Project either on the emulator or the device, then its because the apk file is not being got uploaded on the device and a timeout has occurred! This is the most common error encountered while working with ADT

Solution :
  1. Go to your project folder,
  2. Delete the gen folder
  3. Refresh the project
  4. Delete the contents in the bin folder
  5. Now to a Clean + Build
  6. Try to run the App, it should get uploaded

If the above solution does not work for you then you must try to change the default ADB connection timeout value i.e. 5000ms to some higher value. Let's see how we can do that,

  1. Go to Menu : Window (on Windows OS, else Eclipse -> Preferences if on Mac OS X)
  2. Select Android
  3. Under Android, Select DDMS
  4. Now look for Text field : ADB connection time out (ms):, change the value from default 5000 to say 15000.
  5. Click on Apply and OK.
  6. Now try to run the Application, it should work without throwing any console errors!

If none of the above works for you!! Then try to reboot your device, or if on emulator, close it and re-launch. You can also try to kill the adb services under Task Manager (Activity Monitor if on Mac OS X) and try.

Android Emulator Timeout Error
Android Emulator Timeout Error

Note sometimes faulty USB cords also cause such issues!! Try with some other USB cables. Sometimes we have multiple USB ports on the computer (some are USB2 and some USB3), so just try switching ports too!






      Topics: Pages | 2015 | Tutorials | Questions | Python