Android Emulator Access Server on the LAN

I am having difficulty connecting my Android application to an emulator to connect to servers on my local network. I get

java.net.UnknownHostException 

but servers can be resolved from the computer on which the emulator is running.

Thanks for any help on this topic!

+7
java android android-emulator networking emulation
source share
2 answers

You must use 10.0.2.2 to access the local server.

+10
source share

Try adding <uses-permission android:name="android.permission.INTERNET" /> to your manifest. This allows you to access your application network.

More details can be found here .

+4
source share

All Articles