I was working on an Android app when the virtual device in the Android Emulator on macOS suddenly stopped being able to connect to the network. Using the in-device menus to restart network adapters didn’t help. Restarting the device also didn’t help.

I fixed it by using these commands to “cold boot” the emulator:

emulator -list-avds
# INFO    | Storing crashdata in: /tmp/android-jyc/emu-crash-34.2.14.db, detection is enabled for process: 30346
# Pixel_3a_API_34
emulator @Pixel_3a_API_34 -no-snapshot-load