记录:Android中StackOverflow的问题
}
? ? ? ? 虽然最好的方法仍然是去优化你的布局,解嵌套,不仅能加快页面渲染速度,还能解决此问题。但是实在是没有任何可优化的时候,只能先使用这种比较脏的方式。我最后使用的是进行了降级,因为项目紧张,而且不容有失,所以降级成了最保险的选择。对于2.x系统这种强加的限制,表示真的是太蛋疼了!
?
? ? ? ?The stack size of UI thread in Android 2.x is 12KB and in Android 4.x is 16KB. These 4KB make all the difference - since the above layout crashes on 2.x with StackOverflow.
?
? ? ? 对于嵌套过深的地方,尤其当有listview时,一定要注意,能去fragment就去掉fragment!尽量直接换用ViewGroup
?
?