在设备上调试时“源代码与字节码不匹配" [英] 'Source code does not match the bytecode' when debugging on a device

查看:68
本文介绍了在设备上调试时“源代码与字节码不匹配"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我正在针对 API 级别 21 进行编译:

I have an app which I am compiling against API level 21:

然后在具有 API 级别 23 的真实设备上对其进行调试:

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

问题是当我尝试通过 Android 操作系统自己的类进行调试时,我得到源代码与字节码不匹配".为什么会这样?运行应用程序的测试设备是 API 级别 23,被调试的源文件也是级别 23.

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.

我真的很困惑.谁能解释一下为什么我会看到这条消息以及我该如何解决?

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

推荐答案

Google 有一个 未解决的问题问题跟踪器.

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:

  • 点击构建 ->清洁
  • 在设置中禁用即时运行 ->构建、执行、部署

这篇关于在设备上调试时“源代码与字节码不匹配"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆