无法在Android Studio中设置断点

有时候在android studio中设置了断点,但是当链接设备后,看到的却是一个带x的断点,

此时链接上手机,也是没法停在断点的,真是急人啊!!!

根据断点失败的提示:

[plain] view plaincopy
Warning: No executable code found at line 482 in class com.xx.xx.  

开始搜索。

StackOverflow上有一篇解释,Cannot set Java breakpoint in Intellij IDEA

If you are using Maven dependencies, go to Maven Projects -> refresh
If that does not work, Try top menu –> Build –> Rebuild Project
If that still doesn’t work, try top menu –> File –> Invalidate Cache/Restart
If that still doesn’t work, then $CATALINA_BASE/bin/catalina.sh stop, then start
2和3两个步骤可以解决问题,其他两个应该Maven和Tomcat的,可以忽略

你可能感兴趣的:(studio,调试)