Sunday, August 14, 2011

Beginner's Error in Android

Specified child already has a parent
Specified child already has a parent

Currently I don’t get why I am experiencing this error in Android. Hopefully when I study Android’s intricacies further then I will be able to understand the reason behind this error….

I found a similar case (actually there are a lot of cases where developers encounter this same if not related error in android development) of The specified Child already has a parent Error in developing Android applications. Here's another case of Specified child already has a parent.

Basically, you should call removeView from the parent View first before adding another Child View. Either that or consider designing your code in a different way.

No comments: