Android Studio 2.0 “waiting for the debugger to attach”

可紊 提交于 2019-12-23 22:22:32

问题


Since I've upgraded Android Studio to 2.0, I have been not able to debug. It hangs with "waiting for the debugger to attach" on the screen. Do you have any idea why this is happening?


回答1:


This is a common scenario. Restart your Android Studio and reconnect your device.

I was having the same issue, except I was running into it with the Android Emulator. I figured out that if you put your computer to sleep while Android Studio or the emulator are running, that messes up the connection between them. My problem went away after I restarted both, the emulator, and Android Studio.




回答2:


Clearing the Intellij IDEA (Android Studio) .idea directory which contains configuration information worked for me:

  1. Exit Android Studio
  2. Navigate to the project you are trying to debug
  3. Backup any files inside .idea that you modified (if your project checks any of these into VCS)
  4. Delete .idea directory
  5. Open the project in Android Studio



回答3:


Upgrading Android Studio 2.0 to 2.1 solved the problem.



来源:https://stackoverflow.com/questions/36963347/android-studio-2-0-waiting-for-the-debugger-to-attach

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!