无法在Android Studio中设置断点

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

此时链接上手机,也是没法停在断点的,根据断点失败的提示:

Warning: No executable code found at line 482 in class com.xx.xx.


解决:

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

1.If you are using Maven dependencies, go to Maven Projects -> refresh

2.If that does not work, Try top menu --> Build --> Rebuild Project

3.If that still doesn't work, try top menu --> File --> Invalidate Cache/Restart

4.If that still doesn't work, then $CATALINA_BASE/bin/catalina.sh stop, then start

2和3两个步骤可以解决问题,其他两个应该Maven和Tomcat的,可以忽略


欢迎加入IT怪圈。一个我们自己的圈子。

你可能感兴趣的:(无法在Android Studio中设置断点)