Why did Android Studio disconnect after unplugging the data cable after a successful wireless debug connection through wifi?

I successfully connected my phone through the adb command, and two devices appeared in the running list: one is connected to the usb data cable, the other is connected wirelessly through wifi, both of them work normally, but when I unplug the data cable, both are gone and the operation is not successful

adb connect 192.168.0.7
D:\Android\Source\seven>adb devices
List of devices attached
TWGDU16602017692        device
192.168.0.7:5555        device

after unplugging the data cable:

D:\Android\Source\seven>adb devices
List of devices attached
192.168.0.7:5555        offline

if you want to plug in the data cable to debug, then why do you need wireless debugging? obviously, this is not normal.

what is the reason for this and how to solve it? Thank you

Jun.07,2022
Menu