安卓4.0中的java.lang.StackOverflow Error,而不是安卓3.0中的

java.lang.StackOverflowError in android 4.0 and not in android 3.0(安卓4.0中的java.lang.StackOverflow Error,而不是安卓3.0中的)

本文介绍了安卓4.0中的java.lang.StackOverflow Error,而不是安卓3.0中的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

01-31 12:52:53.020: E/AndroidRuntime(10957): FATAL EXCEPTION: main
01-31 12:52:53.020: E/AndroidRuntime(10957): java.lang.StackOverflowError
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.graphics.Paint.getTextRunAdvances(Paint.java:1711)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.text.TextLine.handleText(TextLine.java:749)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.text.TextLine.handleRun(TextLine.java:972)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.text.TextLine.measureRun(TextLine.java:416)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.text.TextLine.measure(TextLine.java:295)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.text.TextLine.metrics(TextLine.java:269)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.text.Layout.getLineExtent(Layout.java:942)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.text.Layout.draw(Layout.java:405)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.text.BoringLayout.draw(BoringLayout.java:400)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.widget.TextView.onDraw(TextView.java:5038)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.View.draw(View.java:10978)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.widget.AbsListView.dispatchDraw(AbsListView.java:2092)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.View.draw(View.java:11083)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.widget.AbsListView.draw(AbsListView.java:3398)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.View.draw(View.java:11083)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.widget.FrameLayout.draw(FrameLayout.java:450)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.widget.ScrollView.draw(ScrollView.java:1524)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.View.draw(View.java:10981)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.View.draw(View.java:10981)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.widget.FrameLayout.draw(FrameLayout.java:450)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2885)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.View.draw(View.java:10981)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(ViewGroup.java:2887)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
01-31 12:52:53.020: E/AndroidRuntime(10957):    at android.view.ViewGroup.drawChild(Vi

推荐答案

此堆栈与您拥有太多嵌套布局时得到的堆栈非常相似。我会运行layoutopt,看看是否可以减少布局层次结构,看看它是否可以修复它,至于框架差异,我不能说是他们降低了这个限制,还是较新的控件增加了内部层次结构布局,这将您推到了限制之上。很难说...

https://developer.android.com/studio/tools/help/layoutopt.html

这篇关于安卓4.0中的java.lang.StackOverflow Error,而不是安卓3.0中的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:安卓4.0中的java.lang.StackOverflow Error,而不是安卓3.0中的

基础教程推荐