我创建了一个ListView
,它显示了AsyncTask
的结果。获得了结果(可以在日志中看到),但是当在移动设备上进行调度时,它会在调用Adapter
时崩溃。但它可以在模拟器上运行。
07-24 14:50:01.484 7284-7284/wisilica.com.pling E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: wisilica.com.pling, PID: 7284
java.lang.NullPointerException
at android.view.GLES20Canvas.setupModifiers(GLES20Canvas.java:1439)
at android.view.GLES20Canvas.drawLines(GLES20Canvas.java:1019)
at android.view.GLES20Canvas.drawLine(GLES20Canvas.java:1009)
at android.graphics.drawable.GradientDrawable.draw(GradientDrawable.java:538)
at android.widget.ListView.drawDivider(ListView.java:3384)
at android.widget.ListView.dispatchDraw(ListView.java:3279)
at android.view.View.draw(View.java:14743)
at android.widget.AbsListView.draw(AbsListView.java:4064)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.widget.FrameLayout.draw(FrameLayout.java:472)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.getDisplayList(View.java:13631)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.getDisplayList(View.java:13631)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.getDisplayList(View.java:13631)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.widget.FrameLayout.draw(FrameLayout.java:472)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2329)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1570)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1449)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2401)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2273)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1903)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1020)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5762)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:771)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:544)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:757)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang