Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

A few days ago I started having troubles while trying to install a .apk on my Galaxy S2. I select my phone as the target, click OK and in the Console get the following error:

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

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

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

I have tried opening a command window and navigating to android-sdk\platform-tools and running:

adb kill-server adb start-server

This did not fix the issue.

This seems to just be a coincidence, but after failing many times I changed the minimum SDK in the Manifest from 10 to 7 and the .apk loaded on the next try, but has worked intermitently since and generates the same errors.

Can anyone suggest a method for finding what is causing this error?

like image 267
neonDion Avatar asked Mar 21 '13 23:03

neonDion


People also ask

Why is my APK not installing Android?

Why APK won't install on Android? First, make sure that your Android version supports the APK version you want to install. Also, remove the Play Store version of the app before installing an APK. Don't forget to check the storage space and permission to install apps from unknown sources.


1 Answers

After trying the fixes mentioned above, I ended up installing and reinstalling the Galaxy drivers. This didn't help. What eventually worked (so far) was to switch which USB port the Galaxy is plugged into. Once I did this everything was functioning as it should.

like image 65
neonDion Avatar answered Oct 04 '22 02:10

neonDion