Debugging with Android Studio stuck at “Waiting For Debugger” forever

前端 未结 29 2516
甜味超标
甜味超标 2020-12-04 08:36

UPDATE The supposed duplicate is a question on being stucking in \"Waiting For Debugger\" when executing Run, while this

29条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 09:20

    Well, I guess there is a plethora of circumstances that can trigger this issue. I'm using IntelliJ Idea instead, but it's mostly the same than Android Studio. My solution for this problem:

    Fastest way:

    Right click on the class file that contains the main activity of your project, and then on "Debug 'WhateverActivity'". This will create a new run configuration that should debug fine.

    Other solution, without creating a new run configuration:

    1. Open Run/Debug configurations and within "Android app" pick the configuration you're using to debug your app.
    2. Locate "Launch Options/Launch" there and set it to "Specified Activity" instead of "Default Activity".
    3. In the "Launch" field just below the aforementioned option, click on the three ellipsis (three dots) button and select your main activity.

    At least it worked for me. I hope it works for others too.

提交回复
热议问题