Android Studio 3.0.1中AVD无法访问网络及Web服务求助
Hey there, sorry to hear your AVD's stuck with network troubles—let's walk through some targeted fixes since you've already ruled out basic stuff like IP/DNS/VPN issues. These steps are tailored to your Windows 7 and Android Studio 3.0.1 setup:
Reset AVD to default state
Sometimes cached network configs get corrupted. Open the AVD Manager, find your emulator, hit the dropdown menu, and select Wipe Data. This clears all cached data and resets network settings. Restart the emulator after this and test connectivity.Verify Android Studio proxy settings
Even if your system has no proxies, AS might have leftover proxy configs. Go toFile > Settings > Appearance & Behavior > System Settings > HTTP Proxyand make sure it's set to No proxy. Apply the changes and restart Android Studio.Manually set DNS on the emulator
Let's override the emulator's auto-DNS with a reliable public one:- On the emulator, go to Settings > Network & Internet > Wi-Fi.
- Long-press the connected Wi-Fi network and select Modify network.
- Check Show advanced options, set IP settings to Static.
- Enter
8.8.8.8for DNS1 and8.8.4.4for DNS2, then save. Restart the emulator and try browsing again.
Adjust Windows Firewall settings
Windows 7 Firewall often blocks emulator network traffic without warning:- Open Control Panel > Windows Firewall > Allow a program or feature through Windows Firewall.
- Click Change settings (needs admin rights), then look for Android Studio and
qemu-system-x86_64.exe(the underlying emulator process). - Make sure both are checked for Private and Public networks. Alternatively, temporarily disable the firewall to test—if it works, re-enable and add these exceptions.
Switch or update the emulator system image
Certain older system images have known network bugs. Try:- Deleting your current AVD and creating a new one with a different API level (e.g., if you're using API 26, try API 25).
- Updating your system images via SDK Manager > SDK Platforms—check the latest version of your target API and install it.
Change emulator network mode
Open AVD Manager, click Edit on your emulator. Under Emulated Performance, change the Network option from Auto to Bridge or VirtualDevice. Save the changes and restart the emulator.Check your hosts file
A misconfigured hosts file can block Google and other services:- Open Notepad as administrator, then open
C:\Windows\System32\drivers\etc\hosts. - Look for any lines that point
google.comor related domains to127.0.0.1or an invalid IP—delete those lines if present. - Save the file, then open Command Prompt and run
ipconfig /flushdnsto refresh DNS cache.
- Open Notepad as administrator, then open
If none of these work, try restarting your entire computer (sometimes that clears up hidden network conflicts) or checking for any third-party security software that might be intercepting traffic.
内容的提问来源于stack exchange,提问作者Android teem

