3

Problem

Every time I attempt to install and run an app from Android Studio to a physically plugged smartwatch (I develop wearable apps), the device gets disconnected from the ADB list of available devices before the application gets installed.

Steps to reproduce

  1. I unplug -> re-plug the desired device with a USB cable so it gets recognized by ADB and therefore listed in the menu of available devices in Android Studio.
  2. I select the desired device from the list of connected devices in Android Studio.
  3. I hit the 'Run' or 'Debug' button to install the app on the device.
  4. After a few seconds, the device gets disconnected for no apparent reason, and Android Studio provides this message: Android Error message

Setup

  • Android Studio 3.5.1
  • Archlinux 5.3.5 (default kernel)

Remarks

  • The same problem occurs when using adb from the command line. Running the command adb -s device-id install apk-name.apk immediately disconnects the device.
  • The dmesg command indicates that from a system point of view, the device is still connected and recognized.
  • This problem occurs on any device I try. This is, therefore, not a cable or a device issue.
  • The computer I work on also has a Windows partition. The problem does not occur under Windows. This seems to indicate that it is not a hardware issue. It might be a Linux issue or an Android Studio. I have no idea how to find out.
1
  • Were you ever able to resolve this? I have a similar situation with my Mac. thanks
    – Vivek
    Commented Jul 22, 2020 at 12:55

2 Answers 2

3

One related problem in MAC(or may be other operating systems) can also be solved with this You need disable "Use libusb backend" in preferences--> debugger

enter image description here

Please tell others if this was useful for you. Thanks to the following user and their answer: https://stackoverflow.com/a/58095554/3726185

1
  • This should be the accepted answer, changed this and worked first time after restarting Android Studio. Many thanks! Commented Oct 7, 2020 at 23:16
0

I'd suggest updating the Android Studio version.

I had the same issue in 3.5.1 and 3.5.2, but it's working for me in 3.6 Canary 11. Worth mentioning: When I updated to version 3.6, I didn't import the configuration from the previous version, but started from scratch instead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .