I had this problem on Android Studio hedgehog 2023.1.1 using MacOS sonoma 14.1.2 and flutter version 3.16.2. Im using the very latest flutter version. I upgraded all these software versions yesterday, so im not sure which upgrade caused the issue.
I had to get my device back inside the AS device selection dropdown by doing the following:
Kill adb server (while android studio is open):
- Go to
android studio > settings > languages and frameworks > android sdk
, then copy the sdk location (dir on your device).
- In terminal, navigate to that directory, and then
cd platform-tools
- run
adb kill-server
- if this doesnt work run chmod +x adb
to make the adb codefile executable.
- optionally add the adb command to your OS PATH for your terminal to allow you to run adb commands from anywhere in terminal in future.
On your device (I was connected via USB-C while I did this):
- Go to developer options in device settings.
- turn off
USB debugging
- tap
revoke usb debugging authorisations
- turn on
USB debugging
- MacOS sonoma had a popup at this stage about trusting the connected device - accept this.
Finally, from terminal, run adb start-server
then in android studio, refresh the device list - device should now appear.