Android/Eclipse: assistance with LogCat

五迷三道 提交于 2019-12-11 17:40:01

问题


I am building an Android app at the moment, but it keeps crashing.

I am attempting to start an activity from an options menu. I have tried many different methods of starting the activity, but I get the same result each time at the startActivity. I have defined the activity in my Manifest file, and I can run the activity from a button, just not from onOptionsItemSelected.

The error I am receiving is an ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord,Intent) error, so I went searching and found the following question:

Android: ActivityThread.performLaunchActivity error

However, I am not after a solution to this problem.

What I would like to know is how to get my logcat error trace to display in the format shown by the asker in the link above? I can't find a "Caused By" or anything similar in my logcat, which would make debugging a whole lot simpler for me. So if anyone can tell me how to find this information in the logcat, I would be very grateful.

Thanks in advance, Adam.

[EDIT] Here is the LogCat output. It's just lots of information about what my phone is doing, nothing to do with the app that's actually running on the phone!

07-21 15:36:48.441: E/DataRouter(1825): usb connection is true
07-21 15:36:48.441: E/DataRouter(1825): InvokeOemRequestHookRaw usbstatus true is failure 4
07-21 15:36:50.022: E/AlarmManagerService(1986): android_server_AlarmManagerService_set to type=0, 1342850486.300000000
07-21 15:36:50.442: E/DataRouter(1825): usb connection is true 
07-21 15:36:50.442: E/DataRouter(1825): InvokeOemRequestHookRaw usbstatus true is failure 4
07-21 15:36:52.446: E/DataRouter(1825): usb connection is true 
07-21 15:36:52.446: E/DataRouter(1825): InvokeOemRequestHookRaw usbstatus true is failure 4
07-21 15:36:54.447: E/DataRouter(1825): usb connection is true 
07-21 15:36:54.447: E/DataRouter(1825): InvokeOemRequestHookRaw usbstatus true is failure 4
07-21 15:36:56.447: E/DataRouter(1825): usb connection is true 
07-21 15:36:56.447: E/DataRouter(1825): InvokeOemRequestHookRaw usbstatus true is failure 4
07-21 15:36:58.447: E/DataRouter(1825): usb connection is true 
07-21 15:36:58.447: E/DataRouter(1825): InvokeOemRequestHookRaw usbstatus true is failure 4
07-21 15:36:59.996: E/AlarmManagerService(1986): android_server_AlarmManagerService_set to type=3, 148500.000000000
07-21 15:37:00.011: E/AlarmManagerService(1986): android_server_AlarmManagerService_set to type=3, 148498.243000000
07-21 15:37:00.452: E/DataRouter(1825): usb connection is true 
07-21 15:37:00.452: E/DataRouter(1825): InvokeOemRequestHookRaw usbstatus true is failure 4
07-21 15:37:02.452: E/DataRouter(1825): usb connection is true 

回答1:


Did you show the LogCat means,

Go to Window->Show View->Other->Android->LogCat. Here the whole android code debug/trace widgets are available you can simply click you can get it.



来源:https://stackoverflow.com/questions/11589188/android-eclipse-assistance-with-logcat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!