“Failed to attach to the remote VM” connecting jdb to the android emulator on Windows

后端 未结 4 1753
粉色の甜心
粉色の甜心 2020-12-29 10:26

I’ve been trying to connect jdb to the android emulator for a little while, and have been met repeatedly with:

jdb -sourcepath ./src -attach localhost:8700

java.         


        
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 10:50

    Try quitting Android Studio.

    I had a similar problem on the Mac due to the ADB daemon already running. Once you quit any running daemons, you should see output similar to the following:

    $ adb -d jdwp
    28462
    1939
    ^C
    $ adb -d forward tcp:7777 jdwp:1939
    $ jdb -attach localhost:7777 -sourcepath ./src
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    Initializing jdb ...
    > 
    

    See my other answer to a similar question for more details and how to start/stop the daemon.

提交回复
热议问题