Reputation: 139
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:
How should I make it work?
Note: I'm using Tomcat 9, vraptor to webapp and eclipse to android programming.
Upvotes: 0
Views: 85
Reputation: 11
Please make sure you have config permission to access network in AndroidManifest.xml.For example:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
But you first change your IP like MoQ's suggestion.
Upvotes: 0
Reputation: 341
use: http://10.0.2.2:8080 instead to access your pc's localhost from the emulator
Upvotes: 1