Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Endless install in android studio

In the recent times I am considering to change my work title from "Android Developer" to "Endless install progress watcher".

It has been happening ever more often that when I try to run my applications or tests Android Studio stucks in endless installing progress like the image below:

enter image description here

This progress remains like forever. It used to be that if I disconnect my device and connect again the next attempt will succeed. Now it is often the case that I need multiple re-connects until I am able to run.

The speculation is the problem is due to ADB hanging and loosing connection somehow, but I do not know how to overcome that.

My configuration is: - Ubuntu Linux, but colleagues experience the same on Mac OS e.g. - Android Studio 3.5 - device is Nexus 5X, but the same happens on many other devices

like image 537
Boris Strandjev Avatar asked Sep 13 '19 07:09

Boris Strandjev


4 Answers

Try if any of this this solves your problem:

  1. Clean project
  2. Use another device
  3. Go to developer options -> Select debug app -> Turn on "wait for debugger" -> Run your app again
  4. In Developer Options turn off "Monitor apps installed by ADB".
  5. Reboot your phone
  6. Reinstall Android studio
like image 75
Tomaz Mazej Avatar answered Nov 16 '22 12:11

Tomaz Mazej


You may need to try: File -> Settings (Android Studio -> preferences for mac) -> Build,Execution,Deployment -> Instant Run and turn it off.

like image 42
Fulton Avatar answered Nov 16 '22 14:11

Fulton


I had this same problem. I solved it by revoking USB Debugging Authorizations and then re-enabling USB Debugging on my chosen device(s).

like image 1
Malith Pamuditha Fernando Avatar answered Nov 16 '22 13:11

Malith Pamuditha Fernando


It turns out the problem wasn't with Android Studio, but with the device you're using for testing. I tried a different device and it behaved normally, progressing beyond "Installing APK" and stopping on breakpoints.

Somehow the "wait for debugger" setting in developer options on the problem device had switched to off. I switched this back on and now this device is behaving normally.

like image 1
Alfaizkhan Avatar answered Nov 16 '22 13:11

Alfaizkhan