Android studio 4.1 some breakpoint doesnt trigger

时光总嘲笑我的痴心妄想 提交于 2021-01-07 01:19:54

问题


Why doesn't some of my breakpoints trigger? I'm not sure when this issue started, but I now have it in more than one project.

I have Android studio 4.1, no newer updates that I can find.

I have updated to Gradle 6.5 with classpath 'com.android.tools.build:gradle:4.1.0' And I have tried downgrading to 4.0.2 and also updating Gradle to 6.7 and other variations. All this without any effect.

In the two above images I have breakpoints, they are in the same java file. The first one triggers and stops execution. The second one doesn't trigger and stop execution. I know the the code in the second image runs, because during my tests I added a toast there and that toast was shown when I ran my app.

The app runs as expected, I just cant debug some parts of it.

So now i don't know what else to test! Help and tips are very much appreciated!

Update: I tried something weird. I created a new method from inside the method in screenshot 2. If I set a breakpoint in the new method it triggers!!! I have noticed that the breakpoints that don't trigger don't have the little checkmark in them, I assume that the mean something. So what does this mean, do I need extra methods in all my listeners just to be able to debug?


回答1:


It started working again when updating to Android Studio 4.1.1 with Gradle plugin v4.1.1 and Gradle Version 6.7 So i guess it was a bug with Android Studio 4.1



来源:https://stackoverflow.com/questions/64755617/android-studio-4-1-some-breakpoint-doesnt-trigger

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