Can't attach Android Studio's debugger to Android process

后端 未结 12 1145
被撕碎了的回忆
被撕碎了的回忆 2020-12-29 18:12

I can\'t attach Android Studio\'s debugger to my debuggable application process. Anyone else had this issue? Basically I can\'t get my app listed in Choose Process

相关标签:
12条回答
  • 2020-12-29 18:46

    This is what worked for me and its simple, go to Tools->Android->Enable ADB Integration, click on this and mark it selected if not selected this will allow your genymotion instance to connect to ADB but if this doesnt work then, if above mentioned setting is selected then mark unselected and wait till ADB is refreshed( few seconds) then again go to same setting and click on it to mark is selected, this will restart ADB and connect it. This works perfect for me each time i see this issue.

    0 讨论(0)
  • 2020-12-29 18:49
    1. Close the Android Studio.
    2. Kill the adb from terminal 'adb kill-server'. Open android studio ,then attach the debugger. You will be able to see your project.
    0 讨论(0)
  • 2020-12-29 18:50

    It might not be a solution, but I eventually just switched to using an emulator device (Nexus 5), instead of a physical device.

    I tried everything mentioned above, which includes:

    • adb commands
    • android studio upgrade, restart, etc
    • build variants
    • plug in and out the cable.
    0 讨论(0)
  • 2020-12-29 18:53

    I solved this way

    a. Closed Android Studio
    b. Did adb kill-server from a terminal. Also check the adb process in also killed from the Running processes window in PC
    c. Started Android Studio
    d. Android Studio tried to initialize adb again and back to work.

    0 讨论(0)
  • 2020-12-29 18:53

    You do not have to close android studio as I have seen many advise, you can use the terminal from here. In this way : 1 Go to the terminal in Android studio; 2 Did adb kill-server to kill the process; 3 Did adb start-server to running here 4. Check if the devices is attached with adb devices

    Now it should work !

    0 讨论(0)
  • 2020-12-29 18:54

    In addition to all answers before, If you add breakpoints that evaluate and log, may be one of them cause Null Pointer exception. So go to run -> viewBreakpoints... -> unselect all of them.

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