Join Slack
Powered by
Hi, I recently wrote a backend with ktor, now I'm ...
# android
e
Enrico Saggiorato
03/12/2022, 10:08 AM
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
Zun
03/12/2022, 1:15 PM
Use
http://10.0.2.2
instead
l
Landry Norris
03/13/2022, 9:01 PM
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.
13
Views
Open in Slack
Previous
Next