Hi, I recently wrote a backend with ktor, now I'm ...
# android
e
Hi, I recently wrote a backend with ktor, now I'm running it locally on http://localhost:8080 and trying to call it with retrofit, but I'm getting
failed to connect to localhost/127.0.0.1:8080
when usins "http://localhost:8080" as the base URL. How do I setup the thing?
😶 4
z
Use http://10.0.2.2 instead
l
To expand on the previous response, 10.0.2.2 is the address of your computer as seen by a simulator. On a real device on the same network, you want to find out the computer's address on the network.