ubuntu: all android emulator(x86 and arm) stuck on “Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused”

后端 未结 3 566
轻奢々
轻奢々 2021-01-01 05:25

i have try all android emulator, but they are all stuck on following step:

emulator: Error while connecting to socket \'127.0.0.1:1970\': 111 -> Connectio         


        
相关标签:
3条回答
  • 2021-01-01 05:51

    I just spent hours trying to figure this out. Hopefully you found the answer but I will post this here in case anyone comes along looking for it. I had to use the ARM cpu. I am still looking to see if I can find a solution for x86.

    1. Start your AVD and let it hang at the black screen
    2. Open a terminal
    3. Type telnet localhost 5554 (your port number may differ depending on your avd port)
    4. Type redir add tcp:5000:6000
    5. Your AVD should load into the lock screen in a few seconds

    http://developer.android.com/tools/devices/emulator.html

    0 讨论(0)
  • 2021-01-01 06:07

    I had same problem too. I was connected to internet. So I used my actual IP address. Use this command ifconfig -a and get inet addr . Try it please, maybe it can help you.

    0 讨论(0)
  • 2021-01-01 06:10

    If you want to connect to localhost, you need to use 10.0.2.2 on emulator.

    So, in your case it should be : 10.0.2.2:1970

    If you are using Genymotion's emulator use 10.0.3.2 instead 10.0.2.2.

    0 讨论(0)
提交回复
热议问题