I encountered this error while trying to use an android device in debug mode with Android Studio (in Linux)
How I fixed it:
- make sure your device is set in debug mode (Developer options & USB Debugging toggles)
- set your device to Use USB for for File Transfer or Transfer Photos (MTP/PTP)