A
A
Al2017-03-18 04:47:35
Android
Al, 2017-03-18 04:47:35

Why is there no access to local server from Genymotion emulator?

There is a web server on the working PC that hangs on port 3001 , I created a hosts file and threw it into the virtual device via adb :

127.0.0.1             localhost
192.168.1.12          my-site.local
192.168.1.12          api.my-site.local
From the application (I use volley) I can go directly to 192.168.1.12 - this is how everything works (I made sure that the device sees the local server on this IP). But, I need to address by domain. When I access my-site.local:3001 or api.my-site.local:3001 I get a No address associated with hostname error . Why is this happening? (it feels like I didn’t change the hosts file, although I checked everything, downloaded it via the android device monitor - the content is what I uploaded via adb).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2017-03-18
@xmoonlight

Most likely, the .hosts file needs to be created and reloaded after that smart.

A
Al, 2017-03-18
@Sanu0074

rshil trabl, the problem is tabulation with tabs. Pts strange, but that's the point)
stackoverflow.com/questions/33869775/url-mappings-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question