반응형


android 2.3 gingerbread 등에서 layout hierarchy가 너무 중첩돼 있으면, StackOverflowError가 난다.

android 3 이상에서는 잘 나지 않는 것 같다.

따라서, 레이아웃을 최소화 하는 것이 관건..!!
하위 레이아웃이 많이 겹쳐있으면 에러 발생..

에러 발생하는 레이아웃에서 중첩되는 레이아웃을 하나씩 주석처리하고 실행해보자.
그러면 어느 레이아웃 때문에 에러가 발생되는지 알 수 있음..

You have (way) too many nested layouts. You can check out the official Android blog at d.android.com to get tips and tricks on how to optimize layouts.

You have too many nested viewgroups (see: java.lang.StackOverFlow error. Suspected too many views? for tips on how to reduce some of them) 

반응형
,