6

Suddenly my Android Studio stopped detecting all my devices, none of them is working. It happen from one execution to another. I've changed a few lines of code (1 min maybe?), hit run (instant run) and then I missed all my devices.

I'm using a Mac and as devices: Nexus 5x, Galaxy s6 and Oneplus One. What can be happening? I've checked previous questions here and tried all this:

  • Run configurations: no matter if I chose usb device or show the window, it does not work.
  • Tools > Android > Enable ADB integration: didn't help
  • Command line adb devices does not detect any either.
  • I've revoked and granted again USB authorizations. Still not working.
  • I've tried other apps I have, none work.
  • Restarted phones
  • Restarted android studio
  • Restarted computer

(Note: if I start an emulator it works, but I'd prefer to use physical device since I have to scan real barcodes)

Thanks a lot in advance.

Alberto Garrido
  • 485
  • 2
  • 6
  • 15
  • 1
    Try adb kill-server, then adb start-server. – Shiv Buyya Jul 12 '16 at 10:35
  • Maybe try to reinstall phone drivers. Use 'Universal Android USB Driver'. – maatik5 Jul 12 '16 at 10:37
  • @ShivBuyya I did it but didn't work, also when start-server I'm getting this: ``adb start-server * daemon not running. starting it now on port 5037 * adb E 1536 165440 usb_osx.cpp:322] Could not open interface: e00002c5 adb E 1536 165440 usb_osx.cpp:284] Could not find device interface * daemon started successfully *` – Alberto Garrido Jul 12 '16 at 10:40
  • @maatik5 I will try that too, thanks – Alberto Garrido Jul 12 '16 at 10:41
  • Possible duplicate of [Android device is not connected to USB for debugging (Android studio)](https://stackoverflow.com/questions/17509422/android-device-is-not-connected-to-usb-for-debugging-android-studio) – Jadent Sep 27 '18 at 09:31

6 Answers6

7

On Lollipop 5.1

  1. Go to About Phone
  2. Click 7 times on Build Number. Now Developer options are enabled
  3. Go back and Click Developer options
  4. Enable USB debugging under Debugging.
Naveen Paul
  • 454
  • 8
  • 18
5

Well, I've fixed. The problem in case any faces the same was a Stetho (http://facebook.github.io/stetho/) tab in chrome, the one you open by typing: chrome://inspect/#devices not sure about the reason because it's been open for 2 days now, but it was the cause, once I closed it, it worked.

Found this unaccepted answer here: macbook adb cannot open interface That for sure should be accepted.

EDIT: I've been able to replicate the problem. It happens when you have the devices tab open and try to run a second app that has stetho configured.

Community
  • 1
  • 1
Alberto Garrido
  • 485
  • 2
  • 6
  • 15
1

It happens if your device drivers not installed Please do this.

In Case of PC

Right click my computer select manage select device manager from left panel if your phone drivers not installed there will be yellow alert on driver right click on it select update driver software then select search automatically for update driver software.

Other

Please install the missing drivers of your phone.

  • 2
    Hello @Taha, in this case that was not the problem. This was a very particular error. Please take a look at the accepted answer to see the reason of this particular problem. – Alberto Garrido Dec 05 '16 at 14:38
  • May be there are more than one solution to this problem I solved in this way. –  Jan 22 '17 at 09:36
  • You solved completely different problem. The OP is using Mac and your answer is not applicable. – Alex P. Jul 12 '17 at 14:02
0

I had the same problem . What I've done to solve it going to Setting >> Additional Setting >> Developer Option

Now select:

  1. Developer option on
  2. USB debugging on
  3. Install via USB on
  4. USB setting security on
  5. Verify apps over USB
g00glen00b
  • 41,995
  • 13
  • 95
  • 133
imsaiful
  • 1,556
  • 4
  • 26
  • 49
0

OK, what finally worked for me was to go into Settings\Developer options\Select USB Configuration and change it to PTP or MIDI....either one of those worked for me and all of the sudden my phone showed up and I was able to see and run my test app on my android phone.

0

This woorked for me

  1. Go To Settings
  2. Developer Options
  3. Enable USB Debugging
  4. Enable Verify Apps over USB
  5. Select USB Configuration: Choose MIDI

I hope it also works for you