Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

android emulator and local site

I've started android emulator app and trying to open from embeded browser locally started web-site, but local dns name (from /etc/hosts) is not resolved. Is there any option to enable local resolving?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

Refer this URL. The issue is 127.0.0.1 is not the correct IP for accessing local server sites on emulator.

http://localhost:8080/MyTestPage.html // URL to use in computer browser
http://10.0.2.2:8080/MyTestPage.html  // URL to use in emulator browser

However, you need to do some configuration changes as suggested in the URL.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...