react native use fetch achieve real machine nodejs service to interact with the local error Network request failed

I: The Use react native of Android development environment, real test
Step 1: nodejs build back-office services, browser tested successfully
Step 2: Use the IMDb network interface, real machine test is successful
Step 3: service request local nodejs on failed for two reasons
(1) request address, you can not use 127.0.0.1, cmd into the command window, type ipconfig, and to find the ipv4 address, use this
(2) mobile phone network and computer network consistent with a wife environment, to turn off the firewall, the phone can access to the local service

codes, not paste, mainly ideas

Guess you like

Origin www.cnblogs.com/tengyuxin/p/11839288.html
Recommended