i\'m using android studio 2.1.1 in ubuntu 14.04.Now my question is,i want to run the program through my phone without emulator. so i chose the target as usb dev
I already had this problem before.
Choose "Run" then "Edit Configurations". In the "General" tab, check the "Deployment Target Options" section.
In my case, the target was already set to "USB Device" and the checkbox "Use same device for future launches" was checked.
I had to change the target to "Show Device Chooser Dialog" and I unchecked the check box. Then my device appeared in the list.
If your device still doesn't appear, then you have to enable USB-Debugging in the smartphone settings again.
go to "Run>edit configuration>" and select "Open select deployment target dialog" from deployment target option then run your app it will show you a dialog box you can choose your target device from there, enjoy it.
Note: I had problem on Windows 7 but it might help you as well..
I had problem with android studio detecting my phone(Acer Liquid Zest 4G), tried restarting android studio, switching back and forth between PTP and MTP, OS was able to detect device normally.
So what I did was, in Developer Options i enabled USB debugging, USB connection is in PTP mode, then from phone manufacturer's site (you can find site for your phone here: https://developer.android.com/studio/run/oem-usb.html), I downloaded USB driver for my phone model, installed driver and android studio was able to detect my phone(there was no need for restart).
I will repeat again, you must have USB Debugging enabled in Developer Options, otherwise it won't work. Hope it helps.
After i changed my target to usb. i had to create the file /etc/udev/rules.d/51-android.rules with vendor details .Click for Solution
This happened to me on android studio version 4 after doing an update to the IDE. The "invalidate caches and restart" option fixed it.
I had the same thing on Windows 7 where I had the device properly set and the driver installed, and I was routinely running on the device. Then suddenly I started getting this error every time. I opened the Edit Configurations dialog as described above, switched to an emulator, tried one run, then went to the same dialog and changed back to USB. Then if worked again.