现在面临一个奇怪的问题,在我的列表视图中,我正在使用pull刷新列表,它在Samsung Galaxy s2中可以正常工作,但是当我在索尼设备中测试相同的应用程序时,在我刷新列表时崩溃了,它显示java.lang.StackOverflowError.please检查错误日志并给我一个解决方案。
04-27 17:46:23.874: W/dalvikvm(8663): threadid=1: thread exiting with uncaught exception (group=0x2b547210)
04-27 17:46:23.894: E/AndroidRuntime(8663): FATAL EXCEPTION: main
04-27 17:46:23.894: E/AndroidRuntime(8663): java.lang.StackOverflowError
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.GLES20Canvas.drawTextRun(GLES20Canvas.java:1100)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.GLES20RecordingCanvas.drawTextRun(GLES20RecordingCanvas.java:295)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.text.TextLine.drawTextRun(TextLine.java:1067)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.text.TextLine.handleText(TextLine.java:791)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.text.TextLine.handleRun(TextLine.java:1034)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.text.TextLine.drawRun(TextLine.java:397)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.text.TextLine.draw(TextLine.java:195)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.text.BoringLayout.drawInternal(BoringLayout.java:1019)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.text.BoringLayout.draw(BoringLayout.java:950)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.widget.TextView.onDraw(TextView.java:5067)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.draw(View.java:11082)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10521)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.widget.ListView.drawChild(ListView.java:3219)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.widget.AbsListView.dispatchDraw(AbsListView.java:2099)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.widget.ListView.dispatchDraw(ListView.java:3214)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.draw(View.java:11085)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.widget.AbsListView.draw(AbsListView.java:3419)
04-27 17:46:23.894: E/AndroidRuntime(8663): at com.technoracle.chattrspace_demo_refresh.PullToRefreshView$InternalListView.draw(PullToRefreshView.java:59)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10521)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.draw(View.java:11085)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10521)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663): at android.view.ViewGroup.dispatchDr
最佳答案
您肯定具有递归调用函数getDisplayList()
,drawChild()
和dispatchDraw()
,无论如何,它们都会溢出堆栈。您可以检查这些函数的内容,并查看如何中断递归调用模式,以便它们最终返回。
也许布局存在问题,其中元素相互依赖或类似的问题。