问题标签 [android-logcat]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1350 浏览

android - GC_FOR_MALLOC 释放了 N 个对象

我的 Logcat 充满了许多以下消息,其中包含我感兴趣的消息:

我知道如何通过 TAG 和/或 PID 过滤消息但我不知道如何过滤.

我的问题:

  1. 有没有办法过滤那些 GC_FOR_MALLOC 消息?
  2. 这些 GC_FOR_MALLOC 消息如何对应用程序(即不是系统)调试有用?
0 投票
3 回答
2334 浏览

android - 当项目在android的外部设备中运行时,如何在eclipse中启用logcat?

我在android中使用一个应用程序。当项目在外部设备中运行时,我想在 Eclipse 中启用 logcat。当 USB 电缆安装到系统时,我试图加载应用程序。但我无法在 logcat 中看到任何内容,也无法访问设备视图。如果有人知道这件事,请帮助我..

0 投票
2 回答
966 浏览

android - 未找到资源

我一生都无法弄清楚为什么我在我的 logcat 中得到了这个:

11-16 09:08:04.287:W/ResourceType(348):获取资源编号 0x00000004 的值时没有包标识符 11-16 09:08:04.295:W/ImageView(348):无法找到资源:4 11- 16 09:08:04.295: W/ImageView(348): android.content.res.Resources$NotFoundException: 资源 ID #0x4 11-16 09:08:04.295: W/ImageView(348): 在 android.content.res .Resources.getValue(Resources.java:907) 11-16 09:08:04.295: W/ImageView(348): 在 android.content.res.Resources.getDrawable(Resources.java:595) 11-16 09:08 :04.295: W/ImageView(348): 在 android.widget.ImageView.resolveUri(ImageView.java:693) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.ImageView.onMeasure( ImageView.java:796) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.295: W/ImageView( 348):在 android.widget.RelativeLayout。measureChildHorizo​​ntal(RelativeLayout.java:581) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.RelativeLayout.onMeasure(RelativeLayout.java:365) 11-16 09:08:04.295: W/ ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138 ) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.295: W/ImageView(348): 在 android .view.View.measure(View.java:8322) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08 :04.295: W/ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.LinearLayout。measureVertical(LinearLayout.java:386) 11-16 09:08:04.295: W/ImageView(348): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08:04.295: W/ ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138 ) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.295: W/ImageView(348): 在 android .widget.LinearLayout.measureVertical(LinearLayout.java:386) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08 :04.295: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.ViewGroup。measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.295: W/ ImageView(348): 在 android.widget.LinearLayout.measureVertical(LinearLayout.java:386) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309 ) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.295: W/ImageView(348): 在 android .widget.ScrollView.measureChildWithMargins(ScrollView.java:1074) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08 :04.295: W/ImageView(348): 在 android.widget.ScrollView.onMeasure(ScrollView.java:296) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.View。测量(View.java:8322)11-16 09:08:04.295:W/ImageView(348):在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)11-16 09:08:04.295:W/ ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.View.measure(View.java:8322 ) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.295: W/ImageView(348): 在 android .widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.LinearLayout.measureVertical(LinearLayout.java:386) 11-16 09:08 :04.295: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.View.measure(看法。java:8322) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.295: W/ImageView(348) : 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.295: W/ImageView(348): 在 android.widget.FrameLayout .onMeasure(FrameLayout.java:250) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.295: W /ImageView(348): 在 android.view.ViewRoot.performTraversals(ViewRoot.java:876) 11-16 09:08:04.295: W/ImageView(348): 在 android.view.ViewRoot.handleMessage(ViewRoot.java: 1911) 11-16 09:08:04.295:W/ImageView(348): 在 android.os.Handler.dispatchMessage(Handler.java:99) 11-16 09:08:04.295: W/ImageView(348): 在 android.os.Looper.loop(Looper.java :130) 11-16 09:08:04.295: W/ImageView(348): 在 android.app.ActivityThread.main(ActivityThread.java:3821) 11-16 09:08:04.295: W/ImageView(348):在 java.lang.reflect.Method.invokeNative(Native Method) 11-16 09:08:04.295: W/ImageView(348): 在 java.lang.reflect.Method.invoke(Method.java:507) 11-16 09:08:04.295: W/ImageView(348): 在 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 11-16 09:08:04.295: W/ImageView(348):在 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 11-16 09:08:04.295: W/ImageView(348): 在 dalvik.system.NativeStart.main(Native Method) 11-16 09:08:04.295:W/ResourceType(348):获取资源号 0x00000004 11-16 09:08:04.310 的值时没有包标识符:W/ImageView(348):无法找到资源:4 11-16 09:08:04.310:W/ImageView(348):android。 content.res.Resources$NotFoundException: 资源 ID #0x4 11-16 09:08:04.310: W/ImageView(348): at android.content.res.Resources.getValue(Resources.java:907) 11-16 09: 08:04.310: W/ImageView(348): 在 android.content.res.Resources.getDrawable(Resources.java:595) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.ImageView .resolveUri(ImageView.java:693) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.ImageView.onMeasure(ImageView.java:796) 11-16 09:08:04.310: W /ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.RelativeLayout.measureChild(RelativeLayout.java:566) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.RelativeLayout.onMeasure(RelativeLayout.java:381) 11-16 09:08:04.310: W/ImageView(348): 在android.view.View.measure(View.java:8322) 11-16 09:08:04.310: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09: 08:04.310: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.310: W/ImageView(348): 在 android.view.View.measure (View.java:8322) 11-16 09:08:04.310: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.310: W/ImageView (348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.LinearLayout.measureVertical(LinearLayout.java:386) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08:04.310: W/ImageView(348): 在android.view.View.measure(View.java:8322) 11-16 09:08:04.310: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09: 08:04.310: W/ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.LinearLayout.measureVertical (LinearLayout.java:386) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08:04.310: W/ImageView (348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.310: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.310: W/ImageView(348): 在android.widget.LinearLayout.measureVertical(LinearLayout.java:386) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09: 08:04.310: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.ScrollView.measureChildWithMargins (ScrollView.java:1074) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.310: W/ImageView (348): 在 android.widget.ScrollView.onMeasure(ScrollView.java:296) 11-16 09:08:04.310: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04。310: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout .java:250) 11-16 09:08:04.310: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.310: W/ImageView(348) ): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11- 16 09:08:04.310: W/ImageView(348): 在 android.widget.LinearLayout.measureVertical(LinearLayout.java:386) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget。 LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08:04.310: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.310:W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java :250) 11-16 09:08:04.310: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.310: W/ImageView(348):在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.310: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09 :08:04.310: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.310: W/ImageView(348): 在 android.view.ViewRoot。 performTraversals(ViewRoot.java:876) 11-16 09:08:04.310: W/ImageView(348): at android.view.ViewRoot.handleMessage(ViewRoot.java:1911) 11-16 09:08:04.310: W/ ImageView(348):在 android.os.Handler。dispatchMessage(Handler.java:99) 11-16 09:08:04.310: W/ImageView(348): 在 android.os.Looper.loop(Looper.java:130) 11-16 09:08:04.310: W/ ImageView(348): 在 android.app.ActivityThread.main(ActivityThread.java:3821) 11-16 09:08:04.310: W/ImageView(348): 在 java.lang.reflect.Method.invokeNative(Native Method) 11-16 09:08:04.310: W/ImageView(348): 在 java.lang.reflect.Method.invoke(Method.java:507) 11-16 09:08:04.310: W/ImageView(348): 在com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 11-16 09:08:04.310: W/ImageView(348): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:597) 11-16 09:08:04.310: W/ImageView(348): at dalvik.system.NativeStart.main(Native Method) 11-16 09:08:04.318: W/ResourceType(348):获取资源号 0x00000004 的值时没有包标识符 11-16 09:08:04.326:W/ImageView(348):无法找到资源:4 11-16 09:08:04.326:W/ImageView(348):android。 content.res.Resources$NotFoundException: 资源 ID #0x4 11-16 09:08:04.326: W/ImageView(348): at android.content.res.Resources.getValue(Resources.java:907) 11-16 09: 08:04.326: W/ImageView(348): 在 android.content.res.Resources.getDrawable(Resources.java:595) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.ImageView .resolveUri(ImageView.java:693) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.ImageView.onMeasure(ImageView.java:796) 11-16 09:08:04.326: W /ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.RelativeLayout.measureChildHorizo​​ntal(RelativeLayout.java:581) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.RelativeLayout.onMeasure(RelativeLayout.java:365) 11-16 09:08:04.326: W/ImageView(348) : 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.View .measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.326: W /ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.measureVertical(LinearLayout.java:386) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08:04.326: W/ImageView(348): 在android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09: 08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.measureVertical (LinearLayout.java:386) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08:04.326: W/ImageView (348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.326: W/ImageView(348): 在android.widget.LinearLayout.measureVertical(LinearLayout.java:386) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09: 08:04.326: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.ScrollView.measureChildWithMargins (ScrollView.java:1074) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.326: W/ImageView (348): 在 android.widget.ScrollView.onMeasure(ScrollView.java:296) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04。326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout .java:250) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348) ): 在 android.widget.LinearLayout.measureVertical(LinearLayout.java:526) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11- 16 09:08:04.326: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view。 ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.326:带图像视图(348):在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09 :08:04.326:W / ImageView(348):在android.widget.FrameLayout.onMeasure(FrameLayout.java:250)11-16 09:08:04.326:W / ImageView(348):在android.view.View。测量(View.java:8322)11-16 09:08:04.326:W/ImageView(348):在 android.view.ViewRoot.performTraversals(ViewRoot.java:876)11-16 09:08:04.326:W/ ImageView(348): 在 android.view.ViewRoot.handleMessage(ViewRoot.java:1911) 11-16 09:08:04.326: W/ImageView(348): 在 android.os.Handler.dispatchMessage(Handler.java:99 ) 11-16 09:08:04.326: W/ImageView(348): 在 android.os.Looper.loop(Looper.java:130) 11-16 09:08:04.326: W/ImageView(348): 在 android .app.ActivityThread.main(ActivityThread.java:3821) 11-16 09:08:04。326:W/ImageView(348):在 java.lang.reflect.Method.invokeNative(本机方法)11-16 09:08:04.326:W/ImageView(348):在 java.lang.reflect.Method.invoke( Method.java:507) 11-16 09:08:04.326: W/ImageView(348): 在 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 11-16 09:08: 04.326: W/ImageView(348): 在 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 11-16 09:08:04.326: W/ImageView(348): 在 dalvik.system.NativeStart .main(本机方法)11-16 09:08:04.326:W / ResourceType(348):获取资源编号0x00000004 11-16 09:08:04.326的值时没有包标识符:W / ImageView(348):无法查找资源:4 11-16 09:08:04.326: W/ImageView(348): android.content.res.Resources$NotFoundException: 资源 ID #0x4 11-16 09:08:04.326: W/ImageView(348):在 android.content.res.Resources。getValue(Resources.java:907) 11-16 09:08:04.326: W/ImageView(348): 在 android.content.res.Resources.getDrawable(Resources.java:595) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.ImageView.resolveUri(ImageView.java:693) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.ImageView.onMeasure(ImageView.java :796) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348):在 android.widget.RelativeLayout.measureChild(RelativeLayout.java:566) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.RelativeLayout.onMeasure(RelativeLayout.java:381) 11-16 09 :08:04.326: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup。 measureChildWithMargins(ViewGroup.java:3138)11-16 09:08:04.326: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.View.measure (View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.326: W/ImageView (348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.measureVertical(LinearLayout.java:386) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08:04.326: W/ImageView(348): 在 android. view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08: 04.326:W/ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.measureVertical(LinearLayout.java :386) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08:04.326: W/ImageView(348):在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09 :08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout。 measureVertical(LinearLayout.java:386) 11-16 09:08:04.326: W/ImageView(348): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1074) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09: 08:04.326: W/ImageView(348): 在 android.widget.ScrollView.onMeasure(ScrollView.java:296) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.View.measure (View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11-16 09:08:04.326: W/ImageView (348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在安卓。widget.LinearLayout.measureVertical(LinearLayout.java:526) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 11-16 09:08: 04.326: W/ImageView(348): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup .java:3138) 11-16 09:08:04.326: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.326: W/ImageView(348) ): 在 android.view.View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 11- 16 09:08:04.326: W/ImageView(348): 在 android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 11-16 09:08:04.326: W/ImageView(348): 在 android.view。 View.measure(View.java:8322) 11-16 09:08:04.326: W/ImageView(348): 在 android.view.ViewRoot.performTraversals(ViewRoot.java:876) 11-16 09:08:04.326: W/ImageView(348): 在android.view.ViewRoot.handleMessage(ViewRoot.java:1911) 11-16 09:08:04.326: W/ImageView(348): 在 android.os.Handler.dispatchMessage(Handler.java:99) 11-16 09: 08:04.326: W/ImageView(348): 在 android.os.Looper.loop(Looper.java:130) 11-16 09:08:04.326: W/ImageView(348): 在 android.app.ActivityThread.main (ActivityThread.java:3821) 11-16 09:08:04.326: W/ImageView(348): at java.lang.reflect.Method.invokeNative(Native Method) 11-16 09:08:04.326: W/ImageView( 348): 在 java.lang.reflect.Method.invoke(Method.java:507) 11-16 09:08:04.326: W/ImageView(348): 在 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:839) 11-16 09:08:04.326: W/ImageView(348):在 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 11-16 09:08:04.326: W/ImageView(348): 在 dalvik.system.NativeStart.main(Native Method)

我想知道这是否会导致 ANR?我知道它正在寻找不存在的资源......它也发生在似乎是通知的地方:

11-16 09:07:02.271:W/ResourceType(348):获取资源编号 0x00000004 的值时没有包标识符 11-16 09:07:02.271:W/ImageView(348):无法找到资源:4 11- 16 09:07:02.271: W/ImageView(348): android.content.res.Resources$NotFoundException: 资源 ID #0x4 11-16 09:07:02.271: W/ImageView(348): 在 android.content.res .Resources.getValue(Resources.java:907) 11-16 09:07:02.271: W/ImageView(348): 在 android.content.res.Resources.getDrawable(Resources.java:595) 11-16 09:07 :02.271: W/ImageView(348): 在 android.widget.ImageView.resolveUri(ImageView.java:693) 11-16 09:07:02.271: W/ImageView(348): 在 android.widget.ImageView.setImageResource( ImageView.java:383) 11-16 09:07:02.271: W/ImageView(348): 在 java.lang.reflect.Method.invokeNative(Native Method) 11-16 09:07:02.271: W/ImageView(348) ):在java.lang。reflect.Method.invoke(Method.java:507) 11-16 09:07:02.271: W/ImageView(348): 在 android.widget.RemoteViews$ReflectionAction.apply(RemoteViews.java:570) 11-16 09: 07:02.271: W/ImageView(348): 在 android.widget.RemoteViews.performApply(RemoteViews.java:1082) 11-16 09:07:02.271: W/ImageView(348): 在 android.widget.RemoteViews.apply (RemoteViews.java:1057) 11-16 09:07:02.271: W/ImageView(348): at com.android.systemui.statusbar.StatusBarService.makeNotificationView(StatusBarService.java:765) 11-16 09:07:02.271 : W/ImageView(348): 在 com.android.systemui.statusbar.StatusBarService.addNotificationViews(StatusBarService.java:831) 11-16 09:07:02.271: W/ImageView(348): 在 com.android.systemui。 statusbar.StatusBarService.addNotification(StatusBarService.java:555) 11-16 09:07:02.271: W/ImageView(348): at com.android.systemui.statusbar。CommandQueue$H.handleMessage(CommandQueue.java:178) 11-16 09:07:02.271: W/ImageView(348): 在 android.os.Handler.dispatchMessage(Handler.java:99) 11-16 09:07: 02.271: W/ImageView(348): 在 android.os.Looper.loop(Looper.java:130) 11-16 09:07:02.271: W/ImageView(348): 在 android.app.ActivityThread.main(ActivityThread .java:3821) 11-16 09:07:02.271: W/ImageView(348): 在 java.lang.reflect.Method.invokeNative(Native Method) 11-16 09:07:02.271: W/ImageView(348) : 在 java.lang.reflect.Method.invoke(Method.java:507) 11-16 09:07:02.271: W/ImageView(348): 在 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit .java:839) 11-16 09:07:02.271: W/ImageView(348): 在 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 11-16 09:07:02.271: W /ImageView(348):在 dalvik.system.NativeStart。main(本机方法)11-16 09:07:02.521:W/ResourceType(348):获取资源编号 0x00000004 11-16 09:07:02.521 的值时没有包标识符:W/ImageView(348):无法找到资源:4 11-16 09:07:02.521:W/ImageView(348):android.content.res.Resources$NotFoundException:资源 ID #0x4 11-16 09:07:02.521:W/ImageView(348):在android.content.res.Resources.getValue(Resources.java:907) 11-16 09:07:02.521: W/ImageView(348): 在 android.content.res.Resources.getDrawable(Resources.java:595) 11 -16 09:07:02.521: W/ImageView(348): 在 android.widget.ImageView.resolveUri(ImageView.java:693) 11-16 09:07:02.521: W/ImageView(348): 在 android.widget .ImageView.setImageResource(ImageView.java:383) 11-16 09:07:02.521: W/ImageView(348): 在 java.lang.reflect.Method.invokeNative(Native Method) 11-16 09:07:02.521:W/ImageView(348): 在 java.lang.reflect.Method.invoke(Method.java:507) 11-16 09:07:02.521: W/ImageView(348): 在 android.widget.RemoteViews$ReflectionAction.apply (RemoteViews.java:570) 11-16 09:07:02.521: W/ImageView(348): 在 android.widget.RemoteViews.performApply(RemoteViews.java:1082) 11-16 09:07:02.521: W/ImageView (348): 在 android.widget.RemoteViews.apply(RemoteViews.java:1057) 11-16 09:07:02.521: W/ImageView(348): 在 com.android.systemui.statusbar.StatusBarService.makeNotificationView(StatusBarService. java:765) 11-16 09:07:02.521: W/ImageView(348): 在 com.android.systemui.statusbar.StatusBarService.addNotificationViews(StatusBarService.java:831) 11-16 09:07:02.521: W/ ImageView(348): 在 com.android.systemui.statusbar.StatusBarService.updateNotification(StatusBarService.java:658) 11-16 09:07:02.521: W/ImageView(348):在 com.android.systemui.statusbar.CommandQueue$H.handleMessage(CommandQueue.java:183) 11-16 09:07:02.521: W/ImageView(348): 在 android.os.Handler.dispatchMessage(Handler.java: 99) 11-16 09:07:02.521: W/ImageView(348): 在 android.os.Looper.loop(Looper.java:130) 11-16 09:07:02.521: W/ImageView(348): 在android.app.ActivityThread.main(ActivityThread.java:3821) 11-16 09:07:02.521: W/ImageView(348): 在 java.lang.reflect.Method.invokeNative(Native Method) 11-16 09:07 :02.521: W/ImageView(348): at java.lang.reflect.Method.invoke(Method.java:507) 11-16 09:07:02.521: W/ImageView(348): at com.android.internal。 os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 11-16 09:07:02.521: W/ImageView(348): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 11 -16 09:07:02.521:W/ImageView(348):在 dalvik.system。NativeStart.main(本机方法)

两者都适用于资源 ID #0x4 ....想法?

0 投票
1 回答
164 浏览

android - 开发 android 应用程序但没有日志记录

我是第一次开发安卓应用。对此非常陌生。我已经编译了应用程序,当我在 Eclipse 上运行时,我希望看到日志消息,但它从来没有显示在那里

使用 log.i。

0 投票
5 回答
48714 浏览

android - 如何打印异常Android的堆栈跟踪

我想打印堆栈跟踪,因为目前我正在运行它。

我被告知要打印e.stacktrace();

我该怎么做呢?

0 投票
1 回答
611 浏览

android - 安卓设备中的CPU

我下载了一些 jar 库并添加到我的项目中,我在 LOGCAT 中注意到有数千个打印(我猜是 Log.d)。会影响cpu性能吗?

0 投票
1 回答
566 浏览

android - SWT/LogCat 中的错误?或 Android 2.2 AVD

根据提示,我将我的 Android 应用程序的目标从 2.3 更改为 2.2。

从煎锅里出来,投入火中!

现在我的应用程序甚至无法打开(在 2.2 模拟器中),我得到了这个(似乎是 SWT 问题,然后是 android/LogCat 问题):

-- 配置详情 -- 产品:E​​clipse 1.4.1.20110909-0613 (org.eclipse.epp.package.java.product)

0 投票
2 回答
404 浏览

android - 达到日志限制时,LogCat 不会停止滚动我的日志

我正在使用最新的 SDK 工具 R15,如果我的 LogCat 已满(添加新日志时最上面的日志被删除)并且我在当前日志的中间滚动,我的日志仍在向上滚动。我无法让我正在查看的日志处于静止状态。我宁愿在滚动时将滚动位置与日志一起移动。它在以前的版本中似乎有这种行为,但在 R15 中它停止了这种行为。有任何想法吗?

0 投票
10 回答
139210 浏览

android - How to save LogCat contents to file?

I've added debug strings (using Log.d()) and want to see them in context from the contents of logCat. The "save" icon for LogCat has a "Save selected items" hint, but there's got to be a quick way to just save the entire contents, or select the entire contents, but I don't see how to do it.

0 投票
1 回答
9044 浏览

android - 如何访问设备上的 logcat 文件

如何使用我的应用程序从设备访问和读取 logcat 文件(位于“/system/bin/logcat”)。我的手机没有root。

我需要超级用户权限吗?