Logcat 在 AVD 上显示信息 3 次
使用 LogCat 时,日志会显示 3 次。谁能解释为什么会发生这种情况? 日志示例:
04-24 15:45:30.443: INFO/dalvikvm(351): Debugger has detached; object registry had 1 entries
04-24 15:45:30.434: DEBUG/jdwp(351): JDWP shutting down net...
04-24 15:45:30.443: INFO/dalvikvm(351): Debugger has detached; object registry had 1 entries
04-24 15:45:30.482: DEBUG/dalvikvm(351): VM cleaning up
04-24 15:45:30.503: ERROR/AndroidRuntime(351): ERROR: thread attach failed
04-24 15:45:30.482: DEBUG/dalvikvm(351): VM cleaning up
04-24 15:45:30.503: ERROR/AndroidRuntime(351): ERROR: thread attach failed
04-24 15:45:30.482: DEBUG/dalvikvm(351): VM cleaning up
04-24 15:45:30.503: ERROR/AndroidRuntime(351): ERROR: thread attach failed
04-24 15:45:30.973: DEBUG/dalvikvm(351): LinearAlloc 0x0 used 638428 of 5242880 (12%)
04-24 15:45:30.973: DEBUG/dalvikvm(351): LinearAlloc 0x0 used 638428 of 5242880 (12%)
04-24 15:45:30.973: DEBUG/dalvikvm(351): LinearAlloc 0x0 used 638428 of 5242880 (12%)
04-24 15:45:31.202: INFO/ActivityManager(59): Start proc com.nuktu.menu.sample for activity com.nuktu.menu.sample/.main: pid=358 uid=10041 gids={}
04-24 15:45:31.202: INFO/ActivityManager(59): Start proc com.nuktu.menu.sample for activity com.nuktu.menu.sample/.main: pid=358 uid=10041 gids={}
04-24 15:45:31.202: INFO/ActivityManager(59): Start proc com.nuktu.menu.sample for activity com.nuktu.menu.sample/.main: pid=358 uid=10041 gids={}
04-24 15:45:31.952: DEBUG/ddm-heap(358): Got feature list request
04-24 15:45:31.952: DEBUG/ddm-heap(358): Got feature list request
04-24 15:45:31.952: DEBUG/ddm-heap(358): Got feature list request
04-24 15:45:33.922: DEBUG/dalvikvm(233): GC freed 42 objects / 2000 bytes in 6457ms
04-24 15:45:33.922: DEBUG/dalvikvm(233): GC freed 42 objects / 2000 bytes in 6457ms
04-24 15:45:33.922: DEBUG/dalvikvm(233): GC freed 42 objects / 2000 bytes in 6457ms
04-24 15:45:34.953: INFO/ActivityManager(59): Displayed activity com.nuktu.menu.sample/.main: 4650 ms (total 4650 ms)
04-24 15:45:34.953: INFO/ActivityManager(59): Displayed activity com.nuktu.menu.sample/.main: 4650 ms (total 4650 ms)
04-24 15:45:34.953: INFO/ActivityManager(59): Displayed activity com.nuktu.menu.sample/.main: 4650 ms (total 4650 ms)
04-24 15:45:37.472: INFO/ActivityManager(59): Starting activity: Intent { cmp=com.nuktu.menu.sample/.NumTest }
04-24 15:45:37.472: INFO/ActivityManager(59): Starting activity: Intent { cmp=com.nuktu.menu.sample/.NumTest }
04-24 15:45:37.472: INFO/ActivityManager(59): Starting activity: Intent { cmp=com.nuktu.menu.sample/.NumTest }
04-24 15:45:37.932: VERBOSE/TAG(358): Oncreate method
04-24 15:45:37.932: VERBOSE/TAG(358): Oncreate method
04-24 15:45:37.962: VERBOSE/TAG(358): library set to null in oncreate
04-24 15:45:37.973: VERBOSE/TAG(358): define new image
04-24 15:45:37.983: VERBOSE/TAG(358): random number gotten
04-24 15:45:38.002: VERBOSE/TAG(358): ran_num 9
04-24 15:45:37.962: VERBOSE/TAG(358): library set to null in oncreate
04-24 15:45:37.973: VERBOSE/TAG(358): define new image
04-24 15:45:37.983: VERBOSE/TAG(358): random number gotten
04-24 15:45:38.002: VERBOSE/TAG(358): ran_num 9
04-24 15:45:37.932: VERBOSE/TAG(358): Oncreate method
04-24 15:45:37.962: VERBOSE/TAG(358): library set to null in oncreate
When using LogCat the logs are shown three times. Can anyone explain why this is happening?
A sample of the Log:
04-24 15:45:30.443: INFO/dalvikvm(351): Debugger has detached; object registry had 1 entries
04-24 15:45:30.434: DEBUG/jdwp(351): JDWP shutting down net...
04-24 15:45:30.443: INFO/dalvikvm(351): Debugger has detached; object registry had 1 entries
04-24 15:45:30.482: DEBUG/dalvikvm(351): VM cleaning up
04-24 15:45:30.503: ERROR/AndroidRuntime(351): ERROR: thread attach failed
04-24 15:45:30.482: DEBUG/dalvikvm(351): VM cleaning up
04-24 15:45:30.503: ERROR/AndroidRuntime(351): ERROR: thread attach failed
04-24 15:45:30.482: DEBUG/dalvikvm(351): VM cleaning up
04-24 15:45:30.503: ERROR/AndroidRuntime(351): ERROR: thread attach failed
04-24 15:45:30.973: DEBUG/dalvikvm(351): LinearAlloc 0x0 used 638428 of 5242880 (12%)
04-24 15:45:30.973: DEBUG/dalvikvm(351): LinearAlloc 0x0 used 638428 of 5242880 (12%)
04-24 15:45:30.973: DEBUG/dalvikvm(351): LinearAlloc 0x0 used 638428 of 5242880 (12%)
04-24 15:45:31.202: INFO/ActivityManager(59): Start proc com.nuktu.menu.sample for activity com.nuktu.menu.sample/.main: pid=358 uid=10041 gids={}
04-24 15:45:31.202: INFO/ActivityManager(59): Start proc com.nuktu.menu.sample for activity com.nuktu.menu.sample/.main: pid=358 uid=10041 gids={}
04-24 15:45:31.202: INFO/ActivityManager(59): Start proc com.nuktu.menu.sample for activity com.nuktu.menu.sample/.main: pid=358 uid=10041 gids={}
04-24 15:45:31.952: DEBUG/ddm-heap(358): Got feature list request
04-24 15:45:31.952: DEBUG/ddm-heap(358): Got feature list request
04-24 15:45:31.952: DEBUG/ddm-heap(358): Got feature list request
04-24 15:45:33.922: DEBUG/dalvikvm(233): GC freed 42 objects / 2000 bytes in 6457ms
04-24 15:45:33.922: DEBUG/dalvikvm(233): GC freed 42 objects / 2000 bytes in 6457ms
04-24 15:45:33.922: DEBUG/dalvikvm(233): GC freed 42 objects / 2000 bytes in 6457ms
04-24 15:45:34.953: INFO/ActivityManager(59): Displayed activity com.nuktu.menu.sample/.main: 4650 ms (total 4650 ms)
04-24 15:45:34.953: INFO/ActivityManager(59): Displayed activity com.nuktu.menu.sample/.main: 4650 ms (total 4650 ms)
04-24 15:45:34.953: INFO/ActivityManager(59): Displayed activity com.nuktu.menu.sample/.main: 4650 ms (total 4650 ms)
04-24 15:45:37.472: INFO/ActivityManager(59): Starting activity: Intent { cmp=com.nuktu.menu.sample/.NumTest }
04-24 15:45:37.472: INFO/ActivityManager(59): Starting activity: Intent { cmp=com.nuktu.menu.sample/.NumTest }
04-24 15:45:37.472: INFO/ActivityManager(59): Starting activity: Intent { cmp=com.nuktu.menu.sample/.NumTest }
04-24 15:45:37.932: VERBOSE/TAG(358): Oncreate method
04-24 15:45:37.932: VERBOSE/TAG(358): Oncreate method
04-24 15:45:37.962: VERBOSE/TAG(358): library set to null in oncreate
04-24 15:45:37.973: VERBOSE/TAG(358): define new image
04-24 15:45:37.983: VERBOSE/TAG(358): random number gotten
04-24 15:45:38.002: VERBOSE/TAG(358): ran_num 9
04-24 15:45:37.962: VERBOSE/TAG(358): library set to null in oncreate
04-24 15:45:37.973: VERBOSE/TAG(358): define new image
04-24 15:45:37.983: VERBOSE/TAG(358): random number gotten
04-24 15:45:38.002: VERBOSE/TAG(358): ran_num 9
04-24 15:45:37.932: VERBOSE/TAG(358): Oncreate method
04-24 15:45:37.962: VERBOSE/TAG(358): library set to null in oncreate
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这种事在我身上发生过几次。尝试重置 DDMS(这是 Eclipse 中的隐藏选项,查找“屏幕截图”按钮旁边的向下箭头)。
This happened to me a few times. Try resetting the DDMS (it's a hidden option in Eclipse, look for the down arrow next to the "Screenshot" button).
如果您使用 Timber for Logging 等库,请检查您的 CustomApplication 类。
您可能会多次初始化您的库,例如:
If you are using libraries like Timber for Logging, check your CustomApplication class.
You might be initializing your library multiple times like: