Android Studio Stuck on “Installing APK”

2020-02-17 08:45发布

Android Studio no longer seems to be detecting when an app has installed on a target device and opened. It gets stuck on "Installing APK" and the progress bar is empty. There are no errors, the apk successfully installs and opens, it's just the IDE is still showing "Installing APK" and it does not automatically connect the debugger. I can manually connect the debugger using the "Attach debugger to Android process button", but this is not ideal.

Can anyone offer any suggestions for what's up and how to resolve it?

18条回答
家丑人穷心不美
2楼-- · 2020-02-17 09:15

I had this issue with an emulator on Linux. After trying pretty much every solution and suggestion on this page, what made it work for me was turning off Instant Run.

查看更多
【Aperson】
3楼-- · 2020-02-17 09:15

In my case i did not make sure that my android studio DSK manager was up to date with the android version that my device was operating on. So when running flutter doctor all seemed well, and i had the latest android version and all on android studio, but as mentioned it was not matching the version for my device i had connected.

Once i added the correct android version (in my case android 6.0) with SDK manager using android studio, it did not get stuck at installing apk.

查看更多
Fickle 薄情
4楼-- · 2020-02-17 09:16

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

Edit: Cleaning my project also helped with solving this problem.

查看更多
等我变得足够好
5楼-- · 2020-02-17 09:18

For me, the top answer "wait for debugger" was completely greyed out.

What worked for me was to look inside "Apps" and I noticed the app was uninstalled, but only for my current user. Clicking uninstall for all users unblocked the installation via Android Studio again.

查看更多
虎瘦雄心在
6楼-- · 2020-02-17 09:18

Check following in your project

  • build-gradle plugin version in project level build.gradle file
  • gradle version in gradle-wrapper.properties file
  • buildToolsVersion
查看更多
Animai°情兽
7楼-- · 2020-02-17 09:19

I have this problem recently on my Pixel 2 testing device, latest factory image with Android Studio 3.4, on windows 10.

I have tried all methods mentioned but none of them work. It cost me more than 6 hours to figure it out.

My problem is the USB driver, I am not using the "perfect" USB driver. My driver works in most scenarios and commands but not in every scenario.

You do not need Android Studio to dig into this problem, just using adb.

Please try if you can install apk from adb using following command:

adb install xxxx.apk

If it stuck at "performing streamed install" but never finish, this is the problem.

Please try push a big file(more than 5MB) to your device:

adb push xxxx.apk /storage/emulated/0

In my testing, it stuck at 13%, 16%, etc, but never go on. It seems cannot transfer large files. This is why the installation is pending in my case.

I update the driver to another one, and the problem is fixed. Hope it can solve your problem, too.

查看更多
登录 后发表回答