After installing android studio, I installed ADB as well. However, for some reason ADB doesn\'t detect my device. To make a note I think I have done all the basic stuff I fo
I tried everything on my MBP but failed to fix the issue. Finally, with the least expectation, I reset my MBP's SMC, and everything is back to normal!!! https://support.apple.com/en-us/HT201295
I just clean installed my MBP and encountered the same issue. I tried the things suggested here but nothing worked.
What I had to do to fix it was "Revoke USB debugging authorizations" from the Developer options.
Once I did that, it offered up the usual "did you want to allow debugging on this device" option, and everything was back to normal.
I was already in USB debugging enabled state and also had switched USB configuration to PTP. It was still in always charging mode no matter what I do. I had even reinstalled all Android related stuff, tried on multiple devices to find a fix. Finally what worked for me was getting a new cable.
I had posted a question here (now marked as duplicate) since these answers didn't suffice my situation.
In my case, the problem was that developer mode went away after doing an Android system update. Double-check developer mode and USB debugging settings.
Go to developer options and enable USB Debugging:
Settings > More > Developer Options > Debugging > USB Debugging.
Note:
You have to enable developer mode on your phone first
You basically need to set the USB mode to PTP mode instead of Media Transfer Protocol (MTP) mode.
When I connected the device via USB the USB icon and Debugging Mode Icon appeared on the status bar on the device.
If you open control center by swiping down from the top, you should see a "Media device MTP" - Tap for more USB options. Tap it and switch the mode to "Send Images (PTP)" mode and it should ask you if you want to enable USB debugging. Enable it and the device should be recognized by ADB and Android Studio now.