'Android Studio: Installation failed due to: 'device 'xxxxxxxx' not found'

I'm struggling with an issue connecting Android Studio to my Google Pixel 2.

When I plug my phone into my laptop, Android Studio now recognizes the physical device and shows 'Google Pixel 2' in the dropdown of devices to run the app on. When I go to run the app, it compiles without error but when it tries to install the app on my phone the connection between my phone and AS is lost (the device is no longer listed in the dropdown) and this error message is shown in the Run dialog:

06/12 17:08:35: Launching 'app' on Google Pixel 2.
Installation did not succeed.
The application could not be installed.

List of apks:
[0] '/home/kirk/Apps/xxxx/android/app/build/outputs/apk/debug/app-debug.apk'
Installation failed due to: 'device 'xxxxxxxx' not found'
Retry

Clicking the Retry link just results in it being launched in an emulator.

I've tried disconnecting and reconnecting the device, revoking the USB debugging authorisations then re-trusting my computer, as well as closing and re-opening Android Studio.

Any ideas?



Solution 1:[1]

Android Studio–>Preferences–>Build,Execution,Deployment–>Debugger–>“Use libusb backend”, select false–>Apply–>Ok

Solution 2:[2]

Sometimes ADB just need a restart.

adb kill-server

adb start-server

Solution 3:[3]

In my case I had a plugin to connect via wifi, like:

Android WIFI ADB

Try to uninstall this type of plugin then clean Android Studio on Invalidate Caches / Restart...

Solution 4:[4]

This happened to me when I was sharing Wi-Fi from my PC to the phone. When I disconnected my phone from my PC's Wi-Fi, everything worked.

It could be an issue with ADB rather than Android Studio

Solution 5:[5]

I think it is problem with adb not with android studio I tried updating adb it worked for me. Try once

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 KevinLi
Solution 2 tony508
Solution 3 Daniel Beltrami
Solution 4 Enock Lubowa
Solution 5 DpD