I can not figure out how to access localhost from a Genymotion android emulator. By the way, Im using MAMP.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Update
After genymotion update to 2.2 you can use
10.0.3.2
, refAnother approach
To access your localhost through Genymotion is using your PC IP address. to get your IP address go to:
then search for IPv4, copy the IP and paste it in your URL. It should looks like the following:
Hope this works too for you, give me a feedback.
P.S: if it didn't work, turn off the firewall and any anti-virus application you have in your PC.
When i used genymotion in my ubuntu
i used the ip address of the virtual machine as local host and it worked .
in virtual box goto file > preferences > network > select host only network and select adapter tab copy the ipv4 address and use it instead of localhost ...
like http://192.168.56.1/qrstuff/json/
you need this structure
Genymotion
http://10.0.3.2/
Default AVD
http://10.0.2.2/
the http it's very important and the port it's for default It depends on your server.
you can check this url in your browser the smartphone
Genymotion! It works for me using IP 10.0.3.2 but depends on your localhost port. Apache it will be just IP and Tomcat with default port 8080. Here I take screenshots.
1. Apache Screenshot
2. Tomcat Screenshot
Hope this is helpful. Thanks!
Intro:
Solution:
Link:
http://bbowden.tumblr.com/post/58650831283/accessing-a-localhost-server-from-the-genymotion