Android Ktor Client Localhost or Local IP Not Working

194 Views Asked by At

Trying to call a local server API from Android app using Ktor Client with CIO engine.

When I am using localhost:8080 - at that time I am getting Connection Refused exception and when I am using Local IP address at that time I am getting NoRouteToHostException.

localhost and Local IP is working from Postman.

I am using Ktor Client version 2.3.4

How I have to call the local server API using Ktor Client in Android?

Thanks in advance.

0

There are 0 best solutions below