javaandroideclipsetomcatvraptor

How can I access my webapp from my pc by Android emulator?


Well I'm trying to access my webapp from my android emulator device an exception is throwing: java.net.SocketException: socket failed: EACCES (Permission denied)

In browser all right:

Browser access from http://192.168.25.7:8080

But When I try to access it from my app:

App code and thrown exception

How should I make it work?

Note: I'm using Tomcat 9, vraptor to webapp and eclipse to android programming.


Solution

  • use: http://10.0.2.2:8080 instead to access your pc's localhost from the emulator