我在 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/