安卓的StackOverflowError在ViewGroup.resetResolvedTextDirection [英] Android StackOverflowError in ViewGroup.resetResolvedTextDirection

查看:219
本文介绍了安卓的StackOverflowError在ViewGroup.resetResolvedTextDirection的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚去安卓市场发布的更新,我的应用程序,发现有从现有的安装报道了一些新的错误。虽然我能理解(并尝试做一些事情),其中大部分,这个让我颇为不解:

I just went to android market to publish an update to my app and noticed there a few new errors reported from existing installs. While I can understand (and attempt to do something about) most of them, this one leaves me rather puzzled:

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 ...

这是所有有 - 任何类型的其他信息。

This is all there is - no other information of any kind.

我完全难住到哪里开始调查这一点。任何想法是极大的AP preciated。

I'm totally stumped as to where to start investigating this. Any ideas are greatly appreciated.

推荐答案

我找到了问题所在。在我看来,像Android的一个bug,当一个视图的能见度明确设置为它表现可见但查看本身和视图的父不添加到主视图。

I tracked down the problem. It seems to me like a bug in Android, which is exhibited when a View's visibility is explicitly set to VISIBLE but the view itself and the view's parent is not added to the main view.

我终于加入ListView的问题,以XML,而不是在code创造它和移动code setVisibility(View.VISIBLE)后整个视图被添加到主视图(即父层级可从各子被追踪一路开头)。

I finally got around the problem by adding the ListView in question to XML instead of creating it in the code and moving the code setVisibility(View.VISIBLE) to after the entire view is added to the main view (i.e. parent hierarchy can be traced from each child all the way to the beginning).

至少我没有得到这个错误了。

At least I'm not getting this error any more.

这篇关于安卓的StackOverflowError在ViewGroup.resetResolvedTextDirection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆