DDMS - Can't bind to local 8600 for debugger on Android Studio

后端 未结 6 1462
清歌不尽
清歌不尽 2020-12-09 08:45

Am trying to view my database tables using Android Device Monitor and It showing me Errors for reasons which i am not really sure of. And i don\'t have another instance of D

相关标签:
6条回答
  • 2020-12-09 09:24

    Try killing the adb server and restarting the adb server from terminal.

    adb kill-server
    adb start-server
    

    Also on your mobile device, toggle the usb debugging. Both of these combine worked for me when I had this issue.

    Also you may want to consider using Stetho by Facebook, you can view your database as well as run queries with Stetho. Stetho also lets you watch network calls, view your view hierarchy and more.

    0 讨论(0)
  • 2020-12-09 09:24

    A similar question helped me solve this issue here:

    Android Studio and android device monitor

    By opening DDMS from within Android Studio, I am able to bind and monitor my android devices with no more broken pipes or port conflicts.

    Simply follow these steps to open DDMS from within android studio: Select Tools > Android > Android Device Monitor

    I can only assume AS runs a DDMS instance silently, since when AS is closed, manually opening DDMS has no issues. Only when AS is running do I get this when running DDMS from the CLI

    0 讨论(0)
  • 2020-12-09 09:35

    On Mac, Open terminal and type:

        sudo nano /etc/hosts
    

    Add following line to your hosts file

    127.0.0.1        localhost
    

    Save and exit.

    In Android Studio, you can start debugging again. I got stuck with the same problem and I ended up doing above, problem solved.

    Hope this helps :) .

    0 讨论(0)
  • 2020-12-09 09:37

    in case of converting your webapp into android app.

    if u give your url like this : localhost:xxxx/abc/xx then it create the problem because the port of your localhost and port of your emulator is different. you are using emulator it work like a separate device in your computer.

    SO FRIENDS USE IP ADDRESS INSTEAD OF LOCALHOST AND IT WILL WORK ...101% WORK I AM SURE

    0 讨论(0)
  • 2020-12-09 09:40

    What worked for me was restarting the computer. I think this happened after force-quitting Android Studio.

    0 讨论(0)
  • 2020-12-09 09:46

    For osx users

    Yes you need to restart adb. Simply restart android studio should do the trick. If it's still not working, force killing the thread on port 8600 by this

    [sudo] lsof -i :8600
    

    Then for the PID

    kill -9 <PID>
    
    0 讨论(0)
提交回复
热议问题