Home » Android » Endless install in android studio

Endless install in android studio

Posted by: admin May 14, 2020 Leave a comment

Questions:

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

How to&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

Answer:

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

Answer:

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

Answer:

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.

Answer:

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.

Answer:

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.