When I run
adb devices on my MacBook Pro running OS X 10.14.6, I see not only my phone connected by USB but also a network device that I have no interest in. This forces me to manually specify which device I mean when using adb and Android Studio (which I sometimes forget to do). Is there any way to prevent
adb from connecting to network devices?
FWIW, here's what I see at the shell (with some digits of my first device's serial number obscured):
$ adb devices List of devices attached HT8531AXXXXX device 192.168.86.223:5555 device
Update: I was able to temporarily get the network device to go away by running
adb disconnect, as suggested in an answer, but it keeps reappearing.