13

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

13
  • I think you should have a look at this topic right here: stackoverflow.com/questions/40221903/… Sep 18, 2019 at 11:45
  • Run Android studio from terminal and watch the logs after you run your task again. If it prints anything paste it here. Sep 18, 2019 at 11:52
  • this is an error description alike "it's not working" and this not even limited to one device. Sep 19, 2019 at 23:44
  • Is there same problem with relese APK file? Sep 21, 2019 at 8:29
  • @Kaushik Burkule i do not know, but i definitely do need debug working too. Will the results of this experiment help in determining the cause? Sep 21, 2019 at 16:04

6 Answers 6

1

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
1

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

2
1

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

1

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.

2
  • I am not sure where this setting is Sep 25, 2019 at 10:03
  • if you're using Mobile phone for testing than you can find this in your mobile setting > developer mode>Wait for debugger
    – Alfaizkhan
    Sep 25, 2019 at 10:14
1

You must try:

  • Latest Android Emulator Download or Update : Android Emulator version 29.2.1
  • Delete all Emulator which is created previously and Create New for Android 9 or 10.
  • Uninstall app from device if already installed previously. (Remove for all users.)

I think 3rd point will work because you have Nexus Device, Must visit above link.

Hope you will get resolve your issue. Thank you.

1
  • I am using real device. I confirm fresh install never exhibits the problem, but my problem is that sometimes I need to preserve the installation in between runs, thus I can not afford always uninstalling Sep 25, 2019 at 10:05
1

This seems to happen sometimes if you have multiple user accounts on your device. If you uninstall it from the device, it might still be installed for other users and therefore Android Studio can't install the new APK.

Try to do the following (even if the app is not visible on your device!):

adb uninstall <package_name>

If you have seen a success message, that means the app was successfully uninstalled and Android Studio should be able to install the app properly now.

3
  • I do not have multiple users on my device Sep 25, 2019 at 10:06
  • Have you tried it, though? When it happened to me, I had a second user account without me knowing.
    – techfly
    Sep 25, 2019 at 17:04
  • Yup, I checked in the accounts menu Sep 26, 2019 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.