No executable code found at line inside Observer - Android Studio gradle breakpoint

Viewed 1218

I am trying to debug inside of a LiveData Observer but the debugger says that there is

No executable code found at line ...

The following screenshot shows what it looks like after I have removed and replaced the breakpoints at the offending lines.

Android Studio breakpoints

I have already tried the following:

  • The answers on this question: Android studio gradle breakpoint No executable code found at line
  • removing .gradle, .iml, app/build and .idea and restarting
  • invalidating caches and restarting
  • adb kill-server and adb start-server
  • cleaning project and resyncing gradle
  • attaching the debugger to the running process again
  • uninstalling the app from the device and reinstalling

I am using Android Studio 3.2.1

Any other ideas?

1 Answers

In my case, I was using the observer inside the fragment onActivityCreated Method. After moving code to onCreate method activity, it is started working.

Related