Skip to content Skip to sidebar Skip to footer

Illegalstateexception For Addview()

XML:

Solution 1:

You can not add the same view to two different parents or add a view to a parent twice.

It seems that you're trying to add the ll_info view to both the main view and ll_details.

Solution 2:

Your issue is that you are trying to add a view to another view, but that view has already been added to a different view.

On line 67 you are doing:

ll_details.addView(ll_info);

Trying to add ll_info to ll_details. However on line 39 you have already added ll_info to your main view:

main.addView(ll_info);

You cannot add the same view object to two different parents.

Post a Comment for "Illegalstateexception For Addview()"