You can try editing the hosts file from the Android studio terminal.
First go to the terminal and run the emulator
emulator -avd AVDNAME -partition-size 128
Second AVD update to make it writable
adb remount
adb pull /etc/hosts
198.0.0.1 localhost
, adb push hosts /etc/hosts
localhost , .
, !