该应用程序已意外停止:如何调试? [英] The application has stopped unexpectedly: How to Debug?

查看:184
本文介绍了该应用程序已意外停止:如何调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请注意,有不同的主题标题为应用程序已意外停止许多其他的问题,我不要求进行故障排除的一个特殊问题。

Please note, unlike many other questions having the subject title "application has stopped unexpectedly", I am not asking for troubleshooting a particular problem.

相反,我要求的是Android / Eclipse中/ Java的新秀,以解决一个简单的Andr​​oid应用程序,以制定消化大量的信息(和调试!)这个艰巨的任务,最好的策略大纲。

Rather, I am asking for an outline of the best strategy for an Android/Eclipse/Java rookie to tackle this formidable task of digesting huge amounts of information in order to develop (and debug!) a simple Android application.

在我的情况,我把样品骨架应用程序的SDK,修改了它的和我怎么拿到的那一刻我尝试运行它?

In my case, I took the sample skeleton app from the SDK, modified it slightly and what did I get the moment I try to run it?

中的应用   (process.com.example.android.skeletonapp)   意外停止。请尝试   试。

The application (process.com.example.android.skeletonapp) has stopped unexpectedly. Please try again.

好了,我知道,我要看看LogCat中。这是充满了时间戳线盯着我......我现在该怎么办?我需要什么宝贝?

OK, so I know that I have to look LogCat. It's full of timestamped lines staring at me... What do I do now? What do I need to look for?

有没有办法来单步执行程序,发现使应用程序崩溃的说法? (我认为Java程序永不死机,但显然我错了)

Is there a way to single-step the program, to find the statement that makes the app crash? (I thought Java programs never crash, but apparently I was mistaken)

我如何放置一个断点?

你能不能推荐一个Android调试教程在线,比的之一?

Can you recommend an Android debug tutorial online, other than this one?

推荐答案

我是一个Eclipse / Android的初学者为好,但我希望我的简单的调试过程可以帮助...

I'm an Eclipse/Android beginner as well, but hopefully my simple debugging process can help...

您在Eclipse中右键单击旁边,你想打破在该行并选择切换断点中设置断点。从那里,你要选择调试,而不是标准的运行,这将让您步等等。使用由LogCat中(在教程中引用)提供的过滤器,这样就可以针对你想要的信息,而不是通过所有的输出涉水。这将(希望)去帮助你让你的错误意识很长的路要走。

You set breakpoints in Eclipse by right-clicking next to the line you want to break at and selecting "Toggle Breakpoint". From there you'll want to select "Debug" rather than the standard "Run", which will allow you to step through and so on. Use the filters provided by LogCat (referenced in your tutorial) so you can target the messages you want rather than wading through all the output. That will (hopefully) go a long way in helping you make sense of your errors.

至于其他好的教程,我正在寻找周围几个我自己,但没能找到任何宝石呢。

As for other good tutorials, I was searching around for a few myself, but didn't manage to find any gems yet.

这篇关于该应用程序已意外停止:如何调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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