Android的调试RuntimeException的 - 在我的code甚至执行时 [英] Debugging Android RuntimeException - Before my code even executes

查看:97
本文介绍了Android的调试RuntimeException的 - 在我的code甚至执行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是不是新来的Java,但新来的Andr​​oid平台。我发现的平台,缺点之一是在运行时崩溃有意义的反馈。精细的用户code断点适用的地方,但我在第一次运行崩溃是$ P $启动pventing我的项目,我看不到的方式来追查。任何人都可以摆脱任何轻?

I'm not new to Java but new to the Android platform. I'm finding one of the platforms shortcomings to be meaningful feedback on runtime crashes. Fine in user code where breakpoints apply, but I have a crash on first run that is preventing my project from starting, and I can't see a way to track it down. Can anyone shed any light?

DalvikVM[localhost:8626]    
    Thread [<1> main] (Suspended (exception RuntimeException))  
        ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2585  
        ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2679   
        ActivityThread.access$2300(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 125 
        ActivityThread$H.handleMessage(Message) line: 2033  
        ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
        Looper.loop() line: 123 
        ActivityThread.main(String[]) line: 4627    
        Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
        Method.invoke(Object, Object...) line: 521  
        ZygoteInit$MethodAndArgsCaller.run() line: 868  
        ZygoteInit.main(String[]) line: 626 
        NativeStart.main(String[]) line: not available [native method]  
    Thread [<6> Binder Thread #2] (Running) 
    Thread [<5> Binder Thread #1] (Running) 

同样的仿真器和设备。

Same on emulator and device.

我见过崩溃的报道这样的,不会引起通货膨胀无效的XML,所以我删除了所有XML的资源从我的项目,几乎是一个接一个,同样的错误仍然!是否有任何技巧或仪器我可以申请去尝试,并得到一个更有意义的错误消息?谢谢你。

I've seen reports of crashes like these being caused by inflation of invalid XML so I have removed all XML's and resources from my project, almost one by one, and the same error remains! Are there any tricks or instrumentation I can apply to try and get a more meaningful error message? Thanks.

推荐答案

我找到了答案,拾遗在这些情况的更多信息。这个页面有一些非常有用的信息:<一href="http://www.mail-archive.com/android-developers@googlegroups.com/msg79386.html">http://www.mail-archive.com/android-developers@googlegroups.com/msg79386.html

I found the answer to gleaning more information in these situations. This page has some very useful information: http://www.mail-archive.com/android-developers@googlegroups.com/msg79386.html

通过在Eclipse的意见,我可以看到有一个叫'E'presumably的'例外'的价值ClassNotFoundException的价值调试部分打开变量选项卡。通过点击它,我看到了一个完整的描述说,找不到类。这是我的主要活动,我想改名的一个深夜前,然后被人遗忘。 Facepalm 的希望这个信息可以帮助别人!

By opening the 'Variables' tab in the Debug section of Eclipse's views I could see there was a value named 'e' presumably for 'exception' with the value 'ClassNotFoundException'. By clicking on it I saw a fuller description saying the class that couldn't be found. It was my main Activity, which I'd renamed on a late night before, and forgotten about. Facepalm Hope this info helps someone!

这篇关于Android的调试RuntimeException的 - 在我的code甚至执行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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