Android: Failed to install .apk on device "device": timeout

A few days ago I had problems trying to install .apk on my Galaxy S2. I select my phone as the target, click "OK" and get the following error in the console:

Failed to install AvatarRun.apk on device number 'device: timeout Launch canceled!

Without changing anything in the code and working again, I can also get the error:

Failed to install AvatarRun.apk on device number 'device: device not found com.android.ddmlib.InstallException: device not found Launch canceled!

I tried to open a command window and go to android-sdk \ platform-tools and run:

adb kill-server adb start-server

This did not solve the problem.

This seems to be just a coincidence, but after unsuccessful attempts, I changed the minimum SDK in the manifest from 10 to 7, and .apk booted the next time, but it worked with an interval and generated the same errors.

Can anyone suggest a method to find what causes this error?

+4
source share
5 answers

After fixing the fixes mentioned above, I finished installing and reinstalling Galaxy drivers. It did not help. What ultimately worked (for now) was to switch the USB port to which the Galaxy is connected. As soon as I did this, everything worked as it should.

+16
source

This may seem ridiculous, I tried all the methods suggested in Android error: Failed to install * .apk on device *: timeout

None of them work for me except disconnecting the current cable and changing for a new one.

+7
source

There are various solutions.

1) Try changing the timeout of the ADB connection. The default value is 5000; you should change it to 10000 ms or so.

Window → Settings → Android → DDMS → ADB Connection Timeout (ms)

2) Try to disconnect and change the cable. It seems that sometimes Eclipse loses connection with the device. Sometimes you just need to plug in another USB port.

3) You may have to kill the ADB process and restart it.

adb kill-server and then adb start-server

+5
source

For me, the solution is to remove the old apk from the phone.

+3
source

This problem often occurs if the computer is not fast enough. So, if you go to the task manager, you will see the performance. If you are watching a video or running other programs at the same time, when you launch the Android application, close other programs; at least during application installation on a device or emulator. You may even have to close your internet browser.

You may need to upgrade your computer to speed it up if you can.

Hope this helps someone :)

0
source

All Articles