gpt4 book ai didi

Android ADB Logcat——显示完整的 logcat

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:40:38 27 4
gpt4 key购买 nike

我在终端中使用“adb -d logcat”来查看我的应用程序日志文件。最近,我遇到了一大堆运行时错误——由于某种原因我看不到所有这些错误。它只是在结尾处以“...30 more”结束:

[ 08-11 12:27:45.500 8801:0x2261 E/AndroidRuntime ] FATAL EXCEPTION: main java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:347) at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323) at android.widget.AbsListView.obtainView(AbsListView.java:1430) at android.widget.ListView.makeAndAddView(ListView.java:1745) at android.widget.ListView.fillDown(ListView.java:670) at android.widget.ListView.fillFromTop(ListView.java:727) at android.widget.ListView.layoutChildren(ListView.java:1598) at android.widget.AbsListView.onLayout(AbsListView.java:1260) at android.view.View.layout(View.java:7175) at android.widget.FrameLayout.onLayout(FrameLayout.java:338) at android.view.View.layout(View.java:7175) at android.widget.FrameLayout.onLayout(FrameLayout.java:338) at android.view.View.layout(View.java:7175) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130) at android.widget.LinearLayout.onLayout(LinearLayout.java:1047) at android.view.View.layout(View.java:7175) at android.widget.FrameLayout.onLayout(FrameLayout.java:338) at android.view.View.layout(View.java:7175) at android.widget.FrameLayout.onLayout(FrameLayout.java:338) at android.view.View.layout(View.java:7175) at android.view.ViewRoot.performTraversals(ViewRoot.java:1140) at android.view.ViewRoot.handleMessage(ViewRoot.java:1859) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3683) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassCastException: android.widget.FrameLayout at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:340) ... 30 more

如何查看我在 logcat 中收到的“... 30 多个”问题??

最佳答案

来自问题Print full call stack on printStackTrace()? :

here is an explanation of the 'caused by' and '... n more' lines in the printed trace. see also the JavaDoc for printStackTrace. you might not have any work to do.

Note the presence of lines containing the characters "...". These lines indicate that the remainder of the stack trace for this exception matches the indicated number of frames from the bottom of the stack trace of the exception that was caused by this exception (the "enclosing" exception). This shorthand can greatly reduce the length of the output in the common case where a wrapped exception is thrown from same method as the "causative exception" is caught.

关于Android ADB Logcat——显示完整的 logcat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7029643/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com