Android: Volley NoConnectionError

前端 未结 4 1151
不知归路
不知归路 2021-01-06 06:48

I\'m trying to connect to a REST-Server (which I created with Spark) via Android. I can send POST-Requests with POSTMAN (Chrome Addon) and get what I want, but when I try to

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-06 07:12

    if your test on local, try to check an ip address (on window open cmd run ipconfig) then put your ip address again.

    This's an example

    String url = http://127.0.0.1:8080/user <-- error

    String url = "http://172.16.5.240:8080/user <-- worked

提交回复
热议问题