We Are Going To Discuss About ‘Source code does not match the bytecode’ when debugging on a device. So lets Start this Java Article.
‘Source code does not match the bytecode’ when debugging on a device
- 'Source code does not match the bytecode' when debugging on a device
Here is my solution:
If you got more than one library version, this may help.
set a breakpoint on the lib source code
let the code run to the breakpoint
you will got these tips - 'Source code does not match the bytecode' when debugging on a device
Here is my solution:
If you got more than one library version, this may help.
set a breakpoint on the lib source code
let the code run to the breakpoint
you will got these tips
Solution 1
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:
- Click Build -> Clean
- Disable Instant Run, in Settings -> Build, Execution, Deployment
Original Author Michael Hoffmann Of This Content
Solution 2
Here is my solution:
If you got more than one library version, this may help.
- set a breakpoint on the lib source code
- let the code run to the breakpoint
- you will got these tips
-
click the arrow icon
-
you will get this
-
double click to select the correct lib (normally the highest version of the lib is correct)
I have clicked the “disable” button by mistake, you can enable it in the debugger setting
If you do not have the tips in the step 3, maybe you can check whether you have checked the setting options
Original Author Jeffery Ma Of This Content
Solution 3
You should use an Android emulator with the same api level as the compileSdkVersion.
In your case you should use Android emulator with api level 21.
Original Author Uriel Frankel Of This Content
Solution 4
If you use Gradle, it is probably a problem with Gradle caches. (Reference). Alas, even if you run
gradle --refresh-dependencies
, it is not refreshing really all dependencies. Some rubbish remains. (Reference).
So, the most sure (but drastic and long) variant is to clear all inside from the [user]/.gradle/caches. Or to find your problem project there and clear only its caches.
Original Author Gangnus Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.