我有一个有两个微调器的应用程序,第一个用httpget填充总线名称,第二个等待直到选择了总线,然后获取该总线的所有路径并在第二个微调器中加载。但是,如果我尝试向下滚动第一个微调器,它会强制关闭,我不知道为什么。
这是我得到的logcat:
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): FATAL EXCEPTION: main
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): java.lang.NullPointerException
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.ArrayAdapter.getDropDownView(ArrayAdapter.java:376)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.Spinner$DropDownAdapter.getDropDownView(Spinner.java:332)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.Spinner$DropDownAdapter.getView(Spinner.java:328)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.AbsListView.obtainView(AbsListView.java:1446)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.ListView.makeAndAddView(ListView.java:1745)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.ListView.fillDown(ListView.java:670)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.ListView.fillGap(ListView.java:641)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.AbsListView.trackMotionScroll(AbsListView.java:3464)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.AbsListView.onTouchEvent(AbsListView.java:2274)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.widget.ListView.onTouchEvent(ListView.java:3446)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.view.View.dispatchTouchEvent(View.java:3901)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1737)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1153)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.app.Dialog.dispatchTouchEvent(Dialog.java:642)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1721)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2200)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.view.ViewRoot.handleMessage(ViewRoot.java:1884)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.os.Handler.dispatchMessage(Handler.java:99)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.os.Looper.loop(Looper.java:130)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at android.app.ActivityThread.main(ActivityThread.java:3835)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at java.lang.reflect.Method.invokeNative(Native Method)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at java.lang.reflect.Method.invoke(Method.java:507)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
09-17 12:46:07.870: ERROR/AndroidRuntime(7097): at dalvik.system.NativeStart.main(Native Method)