简体   繁体   中英

Can't connect device to localhost

I'm trying to connect my real android device to local server. So at the beginning I connect all devices to 1 network via Wi-Fi.

Next step is copy IPv4 from ipconfig.

Now I'm entering myIpv4:8080 into browser in my android Device and I get ERR_CONNECTION_TIMED_OUT.

I forgot something ? What can be wrong ?

I should get JSON object like in PC browser.

can you check your web server is listening on a 0.0.0.0 or just localhost? Localhost is a loop back IP for every machine. If a webserver is listening to Localhost interface, it only accepts network request from the machine it runs on. Your Android request may be ignored.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM