Android Studio "No Connected Devices" HTC One (M7)

CodingYourLife picture CodingYourLife · Jul 26, 2015 · Viewed 13.2k times · Source

I know there are some questions like this but the solutions don't seem to work for me.

What I tried/have already:

  • I enabled Developer Mode on the device
  • I enabled USB Debugging and Fake Position in Developer Options on the device
  • I can deploy a node cordova app with no problem
  • There are no questionmarks in Device-Manager but Android-USB-Devices/My-HTC.
  • The Google USB Driver is installed but HTC seems to be dependent on the driver that comes with the HTC Sync Manager. I installed/reinstalled/uninstalled it with no change. Currently I have no HTC Sync Manager but kept the HTC driver that came with it.
  • I can see the device with cmd when I go to < android-sdk >\platform-tools and type adb devices and adb kill-server then adb start-server doesn't change anything.
  • I can even see the device when going to Tools>Android>Android-Device-Monitor in Android Studio as Online
  • Run>Edit-Configuration>Target-Device is set to "USB device". If I set it to "Show chooser dialog" also nothing happens when pressing Run/Debug.
  • I installed "Android 5.0.1 (API 21)" (I think that should be the right one) and other stuff with the Android SDK Manager. Only left out Android Wear and Samples on API 21.
  • I have no build errors, it's a fresh blank App.
  • I've always restarted Android Studio after everything I tried.
  • I switched to the USB 2.0 port on my laptop (read somewhere that USB 3.0 can cause troubles)

I read that I should switch from MTP mode to PTP mode but I also read that HTC removed that with some update.

I have a HTC One (M7) with Android 5.0.2 (not hacked or anything) and Windows 8.1. Android Studio is current with v1.2.2. I usally don't develop for Android so it might be a very obvious thing.

No connected devices

Answer

Apostrofix picture Apostrofix · Sep 26, 2015

I just wasted an hour with that problem with the same phone, but I finally made it, so here is what i did:

In Developer options the USB debugging was switched ON:

  1. I disconnected the USB cable from the phone
  2. The I disabled and re-enabled the USB debugging option
  3. Then I clicked on Revoke USB debugging authorisations and confirmed with yes
  4. Then I connected the USB cable to the phone and the popup that asks you to allow the connection finally showed up.
  5. As soon as I confirmed it, Android Studio showed the the device...

That was it.. Hope it saves someone else's time.