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

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

问题描述

我有一个正在根据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 OS自己的类进行调试时,得到源代码与字节码不匹配".为什么会这样呢?应用运行的测试设备为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?

推荐答案

在AOSP中存在一个未解决的问题,其中一些用户给出了可能的解决方案:

There's an open issue for this in AOSP, where some users have given possible solutions: https://code.google.com/p/android/issues/detail?id=225199&sort=-id&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

(截至本文发布之日)给出的潜在解决方案是:

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

  • 点击生成->清理
  • 在设置"->构建,执行,部署"中禁用即时运行

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

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