clamp
clamp

Reputation: 34036

android emulator access server in local network

i am having difficulties to have my android app running in the emulator to connect to servers in my local network. i am getting a

java.net.UnknownHostException

but the servers are resolvable fine from the machine where the emulator is run.

thanks for any help on this topic!

Upvotes: 8

Views: 7448

Answers (2)

You have to use 10.0.2.2 to access local server.

Upvotes: 11

Bradley Stacey
Bradley Stacey

Reputation: 161

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

More can be found here.

Upvotes: 4

Related Questions