Axios (in React-native) not calling server in localhost

The solution came from a different source, but I post it here to help others looking for the same issue. Basically I used Android AVD (emulator) to build the application. But the emulator is in fact another machine, and that’s why it couldn’t call the localhost.

To solve the probleme, I had to send the request in the following way:

instead of:


Leave a Comment