LogCat报错求高人指点错在哪了

汪正富 发布于 2012/10/26 18:38
阅读 2K+
收藏 0
10-26 18:32:23.307: W/dalvikvm(13913): threadid=1: thread exiting with uncaught exception (group=0x40c12258)
10-26 18:32:23.321: E/AndroidRuntime(13913): FATAL EXCEPTION: main
10-26 18:32:23.321: E/AndroidRuntime(13913): java.lang.NullPointerException
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:394)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.AbsSpinner.onMeasure(AbsSpinner.java:192)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.Spinner.onMeasure(Spinner.java:285)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.View.measure(View.java:12773)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.TableRow.getColumnsWidths(TableRow.java:310)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.TableLayout.findLargestCells(TableLayout.java:500)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.TableLayout.measureVertical(TableLayout.java:465)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.TableLayout.onMeasure(TableLayout.java:431)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.View.measure(View.java:12773)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4788)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1374)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1022)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.onMeasure(LinearLayout.java:555)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.View.measure(View.java:12773)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4788)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1374)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1022)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.onMeasure(LinearLayout.java:555)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.View.measure(View.java:12773)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4788)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1374)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.TableLayout.measureChildBeforeLayout(TableLayout.java:456)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.measureVertical(LinearLayout.java:663)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.TableLayout.measureVertical(TableLayout.java:468)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.TableLayout.onMeasure(TableLayout.java:431)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.View.measure(View.java:12773)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4788)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1374)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.TableLayout.measureChildBeforeLayout(TableLayout.java:456)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.measureVertical(LinearLayout.java:663)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.TableLayout.measureVertical(TableLayout.java:468)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.TableLayout.onMeasure(TableLayout.java:431)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.View.measure(View.java:12773)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4788)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.View.measure(View.java:12773)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.measureVertical(LinearLayout.java:815)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.View.measure(View.java:12773)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4788)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
10-26 18:32:23.321: E/AndroidRuntime(13913): at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2103)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.View.measure(View.java:12773)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1149)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2583)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.os.Handler.dispatchMessage(Handler.java:99)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.os.Looper.loop(Looper.java:137)
10-26 18:32:23.321: E/AndroidRuntime(13913): at android.app.ActivityThread.main(ActivityThread.java:4503)
10-26 18:32:23.321: E/AndroidRuntime(13913): at java.lang.reflect.Method.invokeNative(Native Method)
10-26 18:32:23.321: E/AndroidRuntime(13913): at java.lang.reflect.Method.invoke(Method.java:511)
10-26 18:32:23.321: E/AndroidRuntime(13913): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
10-26 18:32:23.321: E/AndroidRuntime(13913): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
10-26 18:32:23.321: E/AndroidRuntime(13913): at dalvik.system.NativeStart.main(Native Method)

加载中
0
lzzzing
lzzzing
(ArrayAdapter.java:394) 某个对象是null 你调用了它的方法
0
汪正富
汪正富
谢谢!这个问题解决了,就是您说的那种情况!
hunk0503
hunk0503
怎么解决的?2
0
穷土包
穷土包

请问怎么解决的?

0
7
7ak8_com
at android.widget.AbsSpinner.onMeasure(AbsSpinner.java:195)

10-26 17:36:26.088: E/AndroidRuntime(6775): at android.view.View.measure(View.java:15172)

我的也是,奇怪的是debug状态正常,单步运行没问题,直接运行null pointer

--http://www.7ak8.com/a/shoujikaifa/android/2013/1026/710.html

返回顶部
顶部