我正在开发一款Android应用程序。在我的一个活动中,我使用了PullToRefreshListView。有时候,在我的活动中会出现java.lang.StackOverflowError异常。我已经尝试修复它,并在Google上搜索了解决方案,但未找到完美的解决方案。
我有两个具有相同功能的活动,它们都使用带有相同数据的PullToRefreshListView。但是,我只在一个活动中遇到了此异常。另一个活动正常运行。
以下是完整的StakeTrace。
请帮助我。对我的糟糕英语表示抱歉。
提前感谢您。
我有两个具有相同功能的活动,它们都使用带有相同数据的PullToRefreshListView。但是,我只在一个活动中遇到了此异常。另一个活动正常运行。
以下是完整的StakeTrace。
请帮助我。对我的糟糕英语表示抱歉。
提前感谢您。
java.lang.StackOverflowError
at android.text.TextLine.handleText(TextLine.java:749)
at android.text.TextLine.handleRun(TextLine.java:972)
at android.text.TextLine.measureRun(TextLine.java:416)
at android.text.TextLine.measure(TextLine.java:295)
at android.text.TextLine.metrics(TextLine.java:269)
at android.text.Layout.getLineExtent(Layout.java:942)
at android.text.Layout.draw(Layout.java:405)
at android.text.BoringLayout.draw(BoringLayout.java:400)
at android.widget.TextView.onDraw(TextView.java:5038)
at android.view.View.draw(View.java:10982)
at android.view.View.getDisplayList(View.java:10421)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:10985)
at android.view.View.getDisplayList(View.java:10421)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.widget.ListView.drawChild(ListView.java:3223)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.widget.AbsListView.dispatchDraw(AbsListView.java:2092)
at android.widget.ListView.dispatchDraw(ListView.java:3218)
at com.handmark.pulltorefresh.library.PullToRefreshListView$InternalListView.dispatchDraw(PullToRefreshListView.java:293)
at android.view.View.draw(View.java:10985)
at android.widget.AbsListView.draw(AbsListView.java:3398)
at android.view.View.getDisplayList(View.java:10421)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:10985)
at android.view.View.getDisplayList(View.java:10421)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:10985)
at android.view.View.getDisplayList(View.java:10421)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:10985)
at android.view.View.getDisplayList(View.java:10421)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:10985)
at android.view.View.getDisplayList(View.java:10421)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:928)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:10985)
at android.view.View.getDisplayList(View.java:10421)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:10985)
at android.widget.FrameLayout.draw(FrameLayout.java:450)
at android.view.View.getDisplayList(View.java:10421)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10419)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:10985)
at android.widget.FrameLayout.draw(FrameLayout.java:450)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2126)
at android.view.View.getDisplayList(View.java:10421)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:842)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:1943)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1667)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2475)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)