TransWikia.com

Device systematically disconnects when installing application with Android Studio

Super User Asked by cyphics on January 5, 2022

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.

2 Answers

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

Answered by Vivek on January 5, 2022

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.

Answered by AquilesCanta on January 5, 2022

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP