我刚去 Android Market 发布我的应用程序更新,发现现有安装报告了一些新错误。虽然我可以理解(并尝试做一些事情)其中的大多数,但这个让我很困惑:
java.lang.StackOverflowError
at android.view.ViewGroup.resetResolvedTextDirection(ViewGroup.java:5131)
at android.view.ViewGroup.resetResolvedTextDirection(ViewGroup.java:5131)
at android.view.ViewGroup.resetResolvedTextDirection(ViewGroup.java:5131)
at android.view.ViewGroup.resetResolvedTextDirection(ViewGroup.java:5131)
at android.view.ViewGroup.resetResolvedTextDirection(ViewGroup.java:5131)
at android.view.ViewGroup.resetResolvedTextDirection(ViewGroup.java:5131)
... this line repeats about 200 times or so ...
仅此而已 - 没有任何其他信息。
我完全不知道从哪里开始调查这个问题。非常感谢任何想法。
最佳答案
这似乎是 ICS 中添加的方法,所以它是 4.0 及以上。看着the code似乎您的层次结构中有某种 View 循环,因为它显然 child.resetResolvedTextDirection();
行在执行此操作。换句话说,您的布局中的一个 ViewGroup
类已以某种方式作为子级添加到其自身的某处。
关于ViewGroup.resetResolvedTextDirection 中的 Android StackOverflowError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9180626/