android - 在 Eclipse 中调试 Android - 'step-into' 跳转到错误的行号

标签 android eclipse debugging

我在 Eclipse 中使用调试器来跟踪 Android 应用程序的执行,但是当我尝试进入 Android 或 Java 类时,调试器不会进入正确的方法。

我正在使用以下代码:

String irlCode = new String("+353");
String fullNumber = irlCode.concat(phoneNoStr);
Log.d(TAG, fullNumber);

Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + phoneNoStr));
startActivity(callIntent);  

当我进入 irlCode.concat(phoneNoStr);startActivity(callIntent); 时,调试器没有进入正确的方法。我确实在第一种情况下进入 String.class ,在第二种情况下进入 Android.class ,但它从未进入正确的方法,它进入在这两种情况下都使用不同的代码行。

如有任何帮助,我们将不胜感激。

最佳答案

这意味着您正在运行的代码与您拥有的源代码不同。 我认为您正在使用旧版本的 android 进行编程。 如果您检查您的项目属性,那么您是否正在使用最新版本的 android? 此外,这可能对您有所帮助: Eclipse debugger runs wrong version of code

关于android - 在 Eclipse 中调试 Android - 'step-into' 跳转到错误的行号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17109317/

相关文章:

java - 如何在 Android 应用程序中使用 AsYouTypeFormatter TextWatcher?

android - 如何启用拆分操作栏?

java - 在 Eclipse IDE 中添加 throws 声明的快捷方式

debugging - 调试/发布配置中的不同 iOS 应用程序设置?

javascript - Chrome 陷入无限循环,无法复制/粘贴以保存我的 jsfiddle

java - 调试java插件

android - 在设备上运行 phonegap - 未找到设备

java - 如何替换 android 4.0.3 的 type_orientation(已弃用)?

eclipse - maven 插件安装在 eclipse 中,缺少要求 : org. eclipse.platform.feature.group 3.6.0

java - 从Java中的文件读取错误