0

I am trying to connect my genymotion emulator to my localhost. After reading an article I got to know that my emulator is running on virtual host so I need to run my application in the same network

So emulator is on ip 192.168.20.101 So I tried to keep my server on 192.168.20.5

I am using dropwizard server. I got an error java.net.BindException: Cannot assign requested address: bind

I used following code to change my yml file

server:
  applicationConnectors:
    - type: http
      bindHost: 192.168.20.5
      port: 8090
  adminConnectors:
      - type: http
        bindHost: 192.168.20.5
        port: 8091
Ladoo
  • 179
  • 8

1 Answers1

0

I am not sure you can bind IP in inside VirtualBox network. What you can do is configure your device to run in bridge mode, like this:

enter image description here

This way the device runs in the same network as your host, so you can easily access localhost or other machines.

Aurélien Gâteau
  • 4,010
  • 3
  • 25
  • 30