javaandroidandroid-studioandroid-debugandroid-6.0.1-marshmallow

'Source code does not match the bytecode' when debugging on a device


I have an app which I am compiling against API level 21: enter image description here

and then debug it on a real device with API level 23:

enter image description here

The problem is when I try debugging through the Android OS's own classes, I get 'Source code does not match the bytecode'. Why is this happening? The test device the app is running on is API level 23, and the source file being debugged is level 23 as well. *enter image description here*

I am really confused. Can anyone explain why I am seeing this message and how I can fix it?


Solution

  • There's an open issue for this in Google's IssueTracker.

    The potential solutions given in the issue (as of the date of this post) are: