Android Socket: java.net.SocketException: No route to host

前端 未结 4 1095
悲哀的现实
悲哀的现实 2021-01-18 14:50

I am trying to connect (through TCP) to the server running on my machine from the Android device. I have android.permission.INTERNET in my manifest file:

<
4条回答
  •  北恋
    北恋 (楼主)
    2021-01-18 15:32

    I was having the same issue with my android app running IP address of the computer. The app was working good and then suddenly volley started throwing exceptions. I tried enabling and disabling my mobile wifi and it didn't work. Then I tried shutting down my main router and turning back on. And just like that volley was happy and the app started working again:)

    Hope that helps.

提交回复
热议问题