Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
372 views
in Technique[技术] by (71.8m points)

reactjs - Android emulator can't connect localhost API

I developed the app with React native and developed back-end with nodejs when start iOS simulator can connect with localhost API but andriond have error message

Network Error

my localhost API is http://127.0.0.1:3000/api/ and I try postman to get localhost API it can work.

In react native I connect with API with axios

I tried a method but I don't know what settings I need to add.I find it weird because iOS can work, but Android doesn't.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...