Android App on Local Server?
I have an android app, which I run on my emulator & my local server. Now, I want the android app on my mobile, (which I managed to get ) to run with my local server. So, app would be on my android device & the back end server will be on my local machine.
So, when I tried to connect the app to the server using the URI http://10.0.2.2:8080/JSPP开发者_开发问答ATH i got connection timed out, and when I use the URI as http://localhost:8080/JSPPATH then i get connection refused.
How could I resolve this problem ?
Your phone is not in the same network as your computer. You need to start the server and bind it to an external IP, and set that IP in the code where you make the connection.
精彩评论