Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Emulator is not connecting to internet

I am using TATA PHOTON PLUS. Android Emulator browser is unable to connect to internet. The "web page not available" message is coming. Do we need to make any settings for making it to connect to internet? Please help.

like image 694
srikanth sanagapalli Avatar asked Aug 31 '11 05:08

srikanth sanagapalli


2 Answers

Goto

 ...\android-sdk-windows\tools>

and write the following and check

emulator -avd your_avd_name -dns-server 8.8.8.8

don't forget to close your previously running AVD, before applying these steps. Hope it works for you thanks.

like image 199
Lalit Poptani Avatar answered Sep 21 '22 22:09

Lalit Poptani


Under Windows you can change the network adapter indexing so the "internet" adapter is the first.

Let's say that you use the wifi adapter to connect to internet. You have to open the PowerShell (as administrator) and execute the command:

netstat -r -n

Among the other things you'll get the list of the network adapters, ie:

Interface List
 18...f0 bf 97 04 da f1 ......Realtek PCIe GBE Family Controller
 30...16 27 37 af c7 99 ......Microsoft Wi-Fi Direct Virtual Adapter
  4...64 27 37 af c7 99 ......Qualcomm Atheros AR9285 Wireless Network Adapter
  7...64 27 37 af c7 9a ......Bluetooth Device (Personal Area Network)
  1...........................Software Loopback Interface 1
 10...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter
 19...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter

Running the command

Set-NetIPInterface –InterfaceIndex "4" –InterfaceMetric "1"

you can move to the top of the list the wifi adapter and this will solve the issue.

Run again the "netstat -r -n" command to verify it.

like image 39
anemomylos Avatar answered Sep 20 '22 22:09

anemomylos