调试异常
我正在尝试创建一个应用程序,但在某个时候我的程序被强制关闭。当我调试它时,我得到了这个堆栈 ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) 行:2496
有谁知道它指的是什么?
I'm trying to create an app and at a point my program gets forced close.While I debug it I get this stack
ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2496
Does anyone knows what it refers to?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够看到导致该异常的原因。也许,沿着痕迹,你会发现一些写着“引起”的行。可能不止一个,所以一定要一直跟踪下去,因为很可能是最后一个。
在这种情况下,启动活动时似乎出了问题(可能在
onCreate()
中)。另请注意,在 LogCat 中,即使不进行调试,您也应该能够看到堆栈跟踪。
You should be able to see what causes that exception. Probably, following the trace, you'll find some line that says "caused by". There might be more than one, so be sure to follow all the way down, because it's the last one that counts, probably.
In this case, it seems something's going wrong while launching an activity (probably in
onCreate()
).Also, note that in the LogCat you should be able to see the stacktrace even without debugging.