简体   繁体   English

Eclipse中的Android错误跟踪?

[英]Android Error tracing in Eclipse?

I am developing Android app in eclipse with Android SDK 2.3, but i am unable to see the errors like we see in java or .net, there are no run time errors tracing, if there is some error i have to place alerts there to check it, where as compiler does not place any error in its window. 我正在使用Android SDK 2.3在eclipse中开发Android应用程序,但是我无法看到像我们在Java或.net中看到的错误,没有运行时错误跟踪,如果有一些错误,我必须在此处放置警报以进行检查它,因为编译器不会在其窗口中放置任何错误。 Its quite strange that it gives compile time error but no run time error. 它给出编译时错误但没有运行时错误很奇怪。 Please help. 请帮忙。

Thanks Atif 谢谢阿蒂夫

Go to Window->Show View->Other.., and select Android->LogCat. 转到窗口->显示视图->其他..,然后选择Android-> LogCat。 This is the running system trace. 这是正在运行的系统跟踪。 I believe this is what you are looking for. 我相信这就是您要寻找的。

So first thing about android is, you will not be able to look your output details in console as your java or .net shows. 因此,关于android的第一件事是,您将无法在控制台中查看Java或.net显示的输出详细信息。 As you might know emulator is what is considered to be your output window. 您可能知道模拟器是您的输出窗口。 And in order to find compile time errors eclipse makes it easy by highlighting your mistakes instantly. 为了找到编译时错误,eclipse可通过立即突出显示您的错误来简化操作。 And as you have asked for, to look at your runtime errors android uses a special view called Logcat . 正如您所要求的,要查看运行时错误,android使用了一个称为Logcat的特殊视图。 This is were you will be listed out with all the runtime details of android. 这是您将列出所有android系统运行时详细信息的地方。 And as you have said that you are not able to view even System.out.println messages not being viewed, you might find it a bit strange but actually android does print these mesages in Logcat for you. 正如您已经说过的,即使您无法查看System.out.println消息,您也可能会发现它有些奇怪,但实际上android确实为您在Logcat中打印了这些消息。 So as the user sparkymat has suggested follow the steps and you are done. 因此,如用户sparkymat所建议的,请按照以下步骤操作,您已完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM